move plugins to extensions

This commit is contained in:
Philipp Kühn
2020-11-02 22:43:54 +01:00
parent 727442c3a5
commit 971e8838a0
8 changed files with 80 additions and 54 deletions

View File

@@ -0,0 +1,19 @@
import { keymap } from 'prosemirror-keymap'
import { baseKeymap } from 'prosemirror-commands'
import { undoInputRule } from 'prosemirror-inputrules'
import { createExtension } from '../Extension'
export const Keymap = createExtension({
addProseMirrorPlugins() {
return [
keymap({ Backspace: undoInputRule }),
keymap(baseKeymap),
]
},
})
declare module '../Editor' {
interface AllExtensions {
Keymap: typeof Keymap,
}
}