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,15 @@
import { Plugin, PluginKey } from 'prosemirror-state'
import { createExtension } from '../Extension'
export const Editable = createExtension({
addProseMirrorPlugins() {
return [
new Plugin({
key: new PluginKey('editable'),
props: {
editable: () => this.editor.options.editable,
},
}),
]
},
})