New to Kendo UI for jQuery? Start a free 30-day trial
Implement Editor Shortcuts to Indent or Outdent a List
Updated on Dec 10, 2025
Environment
| Product | Progress® Kendo UI® Editor for jQuery |
| Operating System | Windows 10 64bit |
| Browser | All |
Description
How can I use Tab and Shift+Tab as shortcuts to indent or outdent an ordered list in the Kendo UI Editor?
Solution
- Handle the
keydownevent of the Kendo UI Editor. - Subscribe for the
keyCode(9) of theTabkey. - Prevent the default operation.
- Check if the
Shiftkey is pressed. - Use the
execmethod to trigger the outdent command. Otherwise, use the same method and trigger the indent command.
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
keydown: function(e) {
if(e.keyCode == 9) {
if(e.shiftKey) {
e.sender.exec("outdent");
}
else {
e.sender.exec("indent");
}
e.preventDefault();
}
}
});
</script>