Custom shortcuts

This example shows how to register a custom keyboard shortcut for an editor command.

Code

<div id="entry-keyboard-shortcuts"></div>
const app = Redactor('#entry-keyboard-shortcuts', {
    hotkeysAdd: {
        'ctrl+shift+h, meta+shift+h': {
            title: 'Highlight',
            name: 'meta+shift+h',
            command: 'inline.set',
            params: { tag: 'mark' }
        }
    }
});