refactoring
This commit is contained in:
@@ -40,10 +40,9 @@ export default {
|
|||||||
this.editor = new Editor({
|
this.editor = new Editor({
|
||||||
extensions: defaultExtensions(),
|
extensions: defaultExtensions(),
|
||||||
content: this.value,
|
content: this.value,
|
||||||
})
|
onUpdate: () => {
|
||||||
|
this.$emit('input', this.editor.getHTML())
|
||||||
this.editor.on('update', () => {
|
},
|
||||||
this.$emit('input', this.editor.getHTML())
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -173,10 +173,9 @@ export default {
|
|||||||
this.editor = new Editor({
|
this.editor = new Editor({
|
||||||
content: this.modelValue,
|
content: this.modelValue,
|
||||||
extensions: defaultExtensions(),
|
extensions: defaultExtensions(),
|
||||||
})
|
onUpdate: () => {
|
||||||
|
this.$emit('update:modelValue', this.editor.getHTML())
|
||||||
this.editor.on('update', () => {
|
},
|
||||||
this.$emit('update:modelValue', this.editor.getHTML())
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user