Kashif Imran
Kashif Imran

Reputation: 159

Tab Key in Froala Editor

Is there a way to disable Tab key in Froala editor and use it for tabindex behavior instead? I can disable the enter key if I bind to 'keydown' and return false if e.which is 13 (using jQuery); but retuning false for keycode 9 (tab) has no effect and Froala keeps replacing Tab with 4 'nbsp' entities. For now, I have employed a hack, whereby I force an 'undo' to Froala when I detect a Tab; but, like I said, it is a hack and I would like to find a clean solution. Also, I have to use 'setTimeout' with this hack; otherwise even the hack does not work.

Any help will be appreciated.

Upvotes: 0

Views: 1426

Answers (1)

st3fan
st3fan

Reputation: 1640

You have to set tabSpaces: false https://editor.froala.com/options#tabSpaces. There is also an example for it on Github: https://github.com/froala/wysiwyg-editor/blob/master/examples/tabSpaces_disabled.html

Upvotes: 2

Related Questions