added shortcuts

This commit is contained in:
2024-04-30 21:35:28 +10:00
parent d4f3e24c33
commit 48131d3064

View File

@@ -30,12 +30,8 @@ const CustomLink = Link.extend({
addKeyboardShortcuts() { addKeyboardShortcuts() {
return { return {
'Mod-k': () => editorToggleLink(this.editor), 'Mod-k': () => editorToggleLink(this.editor),
'Mod-0': () => this.editor.chain().setParagraph().focus().run(), 'Mod-Alt-4': () => this.editor.chain().setSmall().focus().run(),
'Mod-1': () => this.editor.chain().toggleHeading({level: 1}).focus().run(), 'Mod-Alt-5': () => this.editor.chain().setExtraSmall().focus().run(),
'Mod-2': () => this.editor.chain().toggleHeading({level: 2}).focus().run(),
'Mod-3': () => this.editor.chain().toggleHeading({level: 3}).focus().run(),
'Mod-4': () => this.editor.chain().setSmall().focus().run(),
'Mod-5': () => this.editor.chain().setExtraSmall().focus().run(),
} }
} }
}); });