refactoring

This commit is contained in:
Philipp Kühn
2021-02-10 18:05:02 +01:00
parent f70974678b
commit 55ff908423
69 changed files with 519 additions and 527 deletions

View File

@@ -56,9 +56,15 @@ function normalizeKeyName(name: string) {
return result
}
/**
* Trigger a keyboard shortcut.
*/
declare module '@tiptap/core' {
interface Commands {
/**
* Trigger a keyboard shortcut.
*/
keyboardShortcut: (name: string) => Command,
}
}
export const keyboardShortcut: Commands['keyboardShortcut'] = name => ({
editor,
view,
@@ -93,9 +99,3 @@ export const keyboardShortcut: Commands['keyboardShortcut'] = name => ({
return true
}
declare module '@tiptap/core' {
interface Commands {
keyboardShortcut: (name: string) => Command,
}
}