Summernote: Let the tab key be handled by the browser

Created on 11 Sep 2015  路  4Comments  路  Source: summernote/summernote

I have several summernotes in a form, and I'd like to let the user use the Tab key to move from one to the next, just like textareas or other WYSIWYG editors work. For example, if you edit a comment to this issue and press Tab, the focus will go to the "Comment" button.

How can this be done in summernote?

I found a keymap option mentioned in a comment, but there seems to be no way to disable just the TAB key.

The Deep Dive page doesn't say anything about key mapping.

Most helpful comment

The below code worked for me
delete $.summernote.options.keyMap.pc.TAB;
delete $.summernote.options.keyMap.mac.TAB;

All 4 comments

Would be handy, I'd vote up this one!

The below code worked for me
delete $.summernote.options.keyMap.pc.TAB;
delete $.summernote.options.keyMap.mac.TAB;

The below code worked for me
delete $.summernote.options.keyMap.pc.TAB;
delete $.summernote.options.keyMap.mac.TAB;

Where in the code should I put this code?

3426 Adds option to disable TAB, and allows tabbing into and out of Summernote editor.

Was this page helpful?
0 / 5 - 0 ratings