This plugin for open any native iOS keyboard in cordova app.
There is no way to completely replace original keyboard. :-( Under hood this plugin just create invisible native input and open keyboard for it. You just get callback when text changed.
cordova plugin add https://github.com/mnill/cordova-custom-keyboard
- CustomKeyboard.open(startedValue, keyboardType, changedCb, finishedCb);
- CustomKeyboard.change(newValue);
Our plugin creating invisible textview and you need to call 'change' if you want to correct user input;
1 = UIKeyboardTypeDefault;
2 = UIKeyboardTypeASCIICapable;
3 = UIKeyboardTypeNumbersAndPunctuation;
4 = UIKeyboardTypeURL;
5 = UIKeyboardTypeNumberPad;
6 = UIKeyboardTypePhonePad;
7 = UIKeyboardTypeNamePhonePad;
8 = UIKeyboardTypeEmailAddress;
9 = UIKeyboardTypeDecimalPad;
10 = UIKeyboardTypeTwitter;
11 = UIKeyboardTypeWebSearch;
document.getElementById('decimal').onclick = function() {
CustomKeyboard.open(document.getElementById('decimal').value, 9, function (value) {
//fired every time when value changed
document.getElementById('decimal').value = value;
}, function (value) {
alert('Editing ended with ' + value);
fired once when user finished editing.
})
}
- iOS
MIT