New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Tab Key Behavior
This help article describes the default behavior of the tab key in RadEditor and explains how to control it and obtain consistent behavior between browsers.
The Tab key behaves differently among different browsers in RadEditor (Table 1). This is so because the tabbing functionality relies on the browsers' internal commands by default.
Table 1: RadEditor tab key behavior in different browsers according to the cursor position.
Browser | Table | List | Div/Span/P |
---|---|---|---|
FireFox | Table cell navigation | HTML elements navigation | HTML elements navigation |
Chrome | Table cell navigation | Inserts white-spaces within a span element | Inserts white-spaces within a span element |
IE | Table cell navigation | Indents list element | Inserts four elements |
You can select the behavior of IE browser and apply it to the rest (Example 1).
Example 1: Make the RadEditor tab key behavior from IE (Table 1) apply to all browsers.
JavaScript
function OnClientLoad(editor, args) {
var shortcutManager = editor.get_shortCutManager();
if (shortcutManager.findShortCutByName("InsertTabMozilla")) {
shortcutManager.removeShortCut("InsertTabMozilla");
editor.addShortCut("InsertTab", "TAB");
}
}