diff --git a/packages/extension-subscript/src/subscript.ts b/packages/extension-subscript/src/subscript.ts index 066362072..493391514 100644 --- a/packages/extension-subscript/src/subscript.ts +++ b/packages/extension-subscript/src/subscript.ts @@ -66,4 +66,10 @@ export const Subscript = Mark.create({ }, } }, + + addKeyboardShortcuts() { + return { + 'Mod-,': () => this.editor.commands.toggleSubscript(), + } + }, }) diff --git a/packages/extension-superscript/src/superscript.ts b/packages/extension-superscript/src/superscript.ts index 26a348aae..efea644b9 100644 --- a/packages/extension-superscript/src/superscript.ts +++ b/packages/extension-superscript/src/superscript.ts @@ -66,4 +66,10 @@ export const Superscript = Mark.create({ }, } }, + + addKeyboardShortcuts() { + return { + 'Mod-.': () => this.editor.commands.toggleSuperscript(), + } + }, })