draft-js-markdown-shortcuts-plugin
draft-js-markdown-shortcuts-plugin copied to clipboard
keyBindingFn not triggering on tab key press
Inlcuding the draft-js-markdown-shortcuts-plugin
is blocking key binding for the tab key.
Example:
const keyDown = (e) => {
if(e.key === 'Tab'){
console.log('I never get here...');
}
console.log('Other keys are working fine.');
}
<Editor
editorState = {editorState}
onChange = {setEditorState}
keyBindingFn = {keyDown}
plugins = {plugins}
/>
If I remove the plugin, everything works as exepected and I'm able to catch tab key presses. I've tried adding onTab
method to the Editor and works fine, but I get a warning since the method is deprecated.
It's possible to catch tab presses using KeyBindingFn
?