move plugins to extensions
This commit is contained in:
15
packages/core/src/extensions/editable.ts
Normal file
15
packages/core/src/extensions/editable.ts
Normal 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,
|
||||
},
|
||||
}),
|
||||
]
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user