Redactor / Documentation / Settings

Keypress

enterKey #

This setting allows to prevent use of Return key.

$('#redactor').redactor({
    enterKey: false
});

With this set to 'false' and pastePlainText is set to true, line breaks will be replaced by spaces.

tabKey #

This setting turns on Tab key handling. If tabKey is set to false, Tab key will set focus to the next input field on a page.

$('#redactor').redactor({
    tabKey: false
});

If there's no text in Redactor, then regardless of tabKey setting focus will be set to the next input field on a page.

tabAsSpaces #

This setting allows to apply spaces instead of tabulation on Tab key. To turn this setting on, set number of spaces:

$('#redactor').redactor({
    tabAsSpaces: 4
});

preSpaces #

Set to '4' by default.

This setting allows to set the number of spaces that will be applied when a user presses Tab key inside of preformatted blocks.

If set to 'false', Tab key will apply tabulation instead of spaces inside of preformatted blocks.

$('#redactor').redactor({
   preSpaces: false
});