Add keyboard shortcuts to toggle superscript and subscript marks.

This commit is contained in:
Brian Hung 2021-06-08 21:23:58 -07:00
parent 3f57a13d19
commit f3a94e1db4
2 changed files with 12 additions and 0 deletions

View File

@ -66,4 +66,10 @@ export const Subscript = Mark.create<SubscriptExtensionOptions>({
},
}
},
addKeyboardShortcuts() {
return {
'Mod-,': () => this.editor.commands.toggleSubscript(),
}
},
})

View File

@ -66,4 +66,10 @@ export const Superscript = Mark.create<SuperscriptExtensionOptions>({
},
}
},
addKeyboardShortcuts() {
return {
'Mod-.': () => this.editor.commands.toggleSuperscript(),
}
},
})