By default, the editor has a set of predefined keyboard shortcuts that help you edit content faster and easier.
When creating your plugin, you can assign your own shortcut keys for certain plugin commands. Here is more about how to do this.
Windows | Mac | |
---|---|---|
Undo | Ctrl+Z | ⌘+Z |
Redo | Ctrl+Shift+Z | ⌘+Shift+Z |
Select all | Ctrl+A | ⌘+A |
Select all text in the block | Ctrl+Shift+A | ⌘+Shift+A |
Add block | Ctrl+Shift+O | ⌘+Shift+O |
Duplicate block | Ctrl+Shift+D | ⌘+Shift+D |
Move up | Ctrl+Shift+↑ | ⌘+Shift+↑ |
Move down | Ctrl+Shift+↓ | ⌘+Shift+↓ |
Remove inline format | Ctrl+Shift+M | ⌘+Shift+M |
Bold | Ctrl+B | ⌘+B |
Italic | Ctrl+I | ⌘+I |
Underline | Ctrl+U | ⌘+U |
Superscript | Ctrl+H | ⌘+H |
Subscript | Ctrl+L | ⌘+L |
Link | Ctrl+K | ⌘+K |
Add todo | Ctrl+Shift+9 | ⌘+Shift+9 |
Normal text | Ctrl+Alt+0 | ⌘+Alt+0 |
Heading 1 | Ctrl+Alt+1 | ⌘+Alt+1 |
Heading 2 | Ctrl+Alt+2 | ⌘+Alt+2 |
Heading 3 | Ctrl+Alt+3 | ⌘+Alt+3 |
Heading 4 | Ctrl+Alt+4 | ⌘+Alt+4 |
Heading 5 | Ctrl+Alt+5 | ⌘+Alt+5 |
Heading 6 | Ctrl+Alt+6 | ⌘+Alt+6 |
Ordered List | Ctrl+Shift+7 | ⌘+Shift+7 |
Unordered List | Ctrl+Shift+8 | ⌘+Shift+8 |
List Indent | Ctrl+] | ⌘+] |
List Outdent | Ctrl+[ | ⌘+[ |
For some keyboard layers like AZERTY the default shortcuts may not always work, so you can simply add other hotkeys for the desired layer. For example like this:
let app = Redactor('#entry', {
hotkeys: {
'alt+shift+], alt+shift+]': {
title: 'Indent',
name: 'alt+shift+]',
command: 'list.indent'
},
'alt+shift+[, alt+shift+[': {
title: 'Outdent',
name: 'alt+shift+[',
command: 'list.outdent'
}
}
});