Documentation
Shortcut
shortcuts #
Type: Boolean
Object
Default: object
Set to default keyboard shortcuts and corresponding Redactor functions by default.
Shortcuts can be turned off:
$R('#content', {
shortcuts: false
});
shortcutsAdd #
Type: Boolean
Object
Default: false
This setting allows to add custom keyboard shortcuts or replace default shortcuts:
$R('#content', {
shortcutsAdd:
{
'ctrl+t, meta+t': { api: 'module.block.format', args: 'blockquote' },
'ctrl+i': { api: 'module.image.open' }
}
});
The command in this example is one of Redactor API methods and the optional arguments as args
parametr.