Keyboard Shortcuts
The editor comes with some keyboard shortcut defaults. Depending on what you want to use it for, you will probably want to change those keyboard shortcuts to your linking.
In case of HTML Editor most of the core extensions register their own keyboard shortcuts. Depending on what set of extension you use, not all of the below listed keyboard shortcuts work for your editor. Please make sure that if the extension is not enabled its corresponding shortcuts will not work.
Essentials
Command Windows/Linux macOS CopyControl C
Cmd C
CutControl X
Cmd X
PasteControl V
Cmd V
Paste Without FormattingControl Shift V
Cmd Shift V
UndoControl Z
Cmd Z
RedoControl Shift Z
Cmd Shift Z
HardBreakShift Enter
Shift Enter
Text Formatting
Command Windows/Linux macOS BoldControl B
Cmd B
ItalicizeControl I
Cmd I
UnderlineControl U
Cmd U
StrikethroughControl Shift X
Cmd Shift X
HighLightControl Shift H
Cmd Shift H
CodeControl E
Cmd E
Paragraph Formatting
Command Windows/Linux macOS Apply Normal Text StyleControl Alt 0
Cmd Option 0
Apply Heading Style 1Control Alt 1
Cmd Option 1
Apply Heading Style 2Control Alt 2
Cmd Option 2
Apply Heading Style 3Control Alt 3
Cmd Option 3
Apply Heading Style 4Control Alt 4
Cmd Option 4
Apply Heading Style 5Control Alt 5
Cmd Option 5
Apply Heading Style 6Control Alt 6
Cmd Option 6
Ordered ListControl Shift 7
Cmd Shift 7
Bullet ListControl Shift 8
Cmd Shift 8
BlockquoteControl Shift B
Cmd Shift B
Left AlignControl Shift L
Cmd Shift L
Center AlignControl Shift E
Cmd Shift E
Right AlignControl Shift R
Cmd Shift R
JustifyControl Shift J
Cmd Shift J
Text Selection
Command Windows/Linux macOS Select AllControl A
Cmd A
Extend Selection One Character to LeftShift ←
Shift ←
Extend Selection Once Character to RightShift →
Shift →
Extension Selection One Line UpShift ↑
Shift ↑
Extend Selection One Lne DownShift ↓
Shift ↓
Extend Selection to the beginning of the documentControl Shift ↑
Control Shift ↑
Extend Selection to the end of the documentControl Shift ↓
Control Shift ↓
Override/Custom Keyboard Shortcuts
The prop
KeyboardShortcut
is present for both HTMlEditor and Text Editor. This prop can be used to override the current keyboard shortcuts present or to add new custom keyboard shortcuts for the editor. The format ofkeyboardShortcuts
prop isThe keyString could be strings like{ [keyString]: shortcutHandler }'Shift-Control-Enter'
and'Mod-l'
. Keys are based on the strings that can appear inevent.key
, concatenated with a-
.shortcutHandler
is callback function to be run for that keyboard shortcut, it should return false if you want default handler to run and true if default handler should not be executed.Editor will only consider the KeyboardShortcut handlers provided at the time of the mount of editor, if the new shortcuts are provided after the mount, editor will ignore those shortcut handlers.
In the example below the border of TextEditor will change when you press
Command+Enter
orCtrl+Enter