cordova-plugin-impac-keyboard
v1.0.1
Published
An Cordova plugin for iOS and Android that add a native keyboard for chats.
Downloads
2
Maintainers
Readme
README
Cordova Plugin for iOS and Android to present a native input field for chat applications.
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(() => {
});