mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-22 08:07:50 +08:00
18 lines
368 B
TypeScript
18 lines
368 B
TypeScript
import { Plugin, PluginKey } from 'prosemirror-state'
|
|
import { Extension } from '../Extension'
|
|
|
|
export const Editable = Extension.create({
|
|
name: 'editable',
|
|
|
|
addProseMirrorPlugins() {
|
|
return [
|
|
new Plugin({
|
|
key: new PluginKey('editable'),
|
|
props: {
|
|
editable: () => this.editor.options.editable,
|
|
},
|
|
}),
|
|
]
|
|
},
|
|
})
|