16 lines
352 B
TypeScript
16 lines
352 B
TypeScript
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,
|
|
},
|
|
}),
|
|
]
|
|
},
|
|
})
|