1.0.1 • Published 4 years ago

cordova-plugin-impac-keyboard v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

README

Cordova Plugin for iOS and Android to present a native input field for chat applications.

IMG_B631B3A1D0D9-1

Supported platforms

  • Android 5+
  • iOS 11+

Installation

cordova plugin add cordova-plugin-impac-keyboard

Show / hide input field

To add the input field to the current screen perform showKeyboard.

window.plugins.impacKeyboard.showKeyboard(() => {
  // Keyboard is presented
});

To remove the input field again perform hideKeyboard

window.plugins.impacKeyboard.hideKeyboard(() => {
  // Keyboard removed
});

Customize layout

To set the color of the right button use setColor.

window.plugins.impacKeyboard.setColor("#f5f5f5");

To set the image of the button use base64 endcoded image file.

window.plugins.impacKeyboard.setImage("bas64…");

Events

Make sure to listen onSendMessage to know if the user pressed the button.

window.plugins.impacKeyboard.onSendMessage(() => {
  
});