wip: add getExtensionField

This commit is contained in:
Philipp Kühn
2021-04-15 21:14:33 +02:00
parent d194b90a61
commit 07bc40ce75
11 changed files with 213 additions and 274 deletions

View File

@@ -41,48 +41,13 @@ export default {
Document,
Paragraph,
Text,
Extension
.create({
defaultOptions: {
foo: 'foo0',
},
addProseMirrorPlugins() {
console.log(0, this.options)
return []
},
})
CodeBlockLowlight
.extend({
// defaultOptions: {
// foo: 'foo1',
// },
addProseMirrorPlugins() {
console.log(1, this.options)
// console.log(1, this.parentConfig.addProseMirrorPlugins)
return this.parentConfig.addProseMirrorPlugins?.() || []
// return []
addNodeView() {
return VueNodeViewRenderer(CodeBlockComponent)
},
})
.extend({
// defaultOptions: {
// foo: 'foo2',
// },
})
// .extend({
// addProseMirrorPlugins() {
// console.log(2, this.parentConfig.addProseMirrorPlugins)
// // return this.parentConfig.addProseMirrorPlugins?.() || []
// return []
// },
// })
// CodeBlockLowlight
// .extend({
// addNodeView() {
// return VueNodeViewRenderer(CodeBlockComponent)
// },
// })
// // .configure({ lowlight }),
.configure({ lowlight }),
],
content: `
<p>