Allows you to open the virtual keyboard and enter data using the mouse.
It also allows you to set a series of buttons with hot keys, which will enter the character specified for them. Can be used for languages that do not have a proper keyboard.
Copy<textarea id="editor1"></textarea> <script> const editor = Jodit.make('#editor1', { buttons: [ 'keyboard', { group: 'custom', buttons: [] } ] keyboard: { extraKeyGroup: 'custom', extraKeyButtons: [ { key: 'λ', hotkey: 'ctrl+1' }, 'β' // Will have hotkey alt+2 ] } }); editor.execCommand('toggleKeyboard'); // Show virtual keyboard editor.execCommand('toggleKeyboard'); // Hide virtual keyboard </script>
Dictionary of language keyboard layouts of the form:
Copyinterface ILayoutKeys { title: string; keys: string[][]; }
Where characters are separated by a space
Copy<textarea id="editor2"></textarea> <script> const editor = Jodit.make('#editor2', { keyboard: { defaultLayoutSet: 'ru', layoutList: { tata: { title: 'Russian language', // prettier-ignore key: [ ['` ~ ±', '1 ! §', '2 @ "', '3 # :', '4 $ <', '5 % >', '6 ^', '7 &', '8 *', '9 (', '0 )', '- _', '= +', 'Backspace'], ['Tab', 'й Й', 'ц Ц', 'у У', 'к К', 'е Е', 'н Н', 'г Г', 'ш Ш', 'щ Щ', 'з З', 'х Х [', 'ъ ] {', '\\ | }'], ['Caps', 'ф Ф', 'ы Ы', 'в В', 'а А', 'п П', 'р Р', 'о О', 'л Л', 'д Д', 'ж Ж ;', 'э Э \'', 'Enter'], ['Shift', 'я Я', 'ч Ч', 'с С', 'м М', 'и И', 'т Т', 'ь Ь', 'б Б ,', 'ю Ю .', '/ ?', 'Shift'], ['Options', 'Space', 'Options'], ] // prettier-ignore-end } } } }); </script>
Set layout language by default.
Copy<textarea id="editor2"></textarea> <script> const editor = Jodit.make('#editor2', { keyboard: { defaultLayoutSet: 'ru' } }); </script>
Show keyboard layout selection buttons in the header of the virtual keyboard.
Copy<textarea id="editor3"></textarea> <script> const editor = Jodit.make('#editor3', { keyboard: { layoutSwitchList: ['ru', 'tata'], defaultLayoutSet: 'tata' } }); </script>