docs: update content
This commit is contained in:
@@ -26,8 +26,12 @@ export default {
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
value(value) {
|
value(value) {
|
||||||
|
// HTML
|
||||||
const isSame = this.editor.getHTML() === value
|
const isSame = this.editor.getHTML() === value
|
||||||
|
|
||||||
|
// JSON
|
||||||
|
// const isSame = this.editor.getJSON().toString() === value.toString()
|
||||||
|
|
||||||
if (isSame) {
|
if (isSame) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -41,7 +45,11 @@ export default {
|
|||||||
extensions: defaultExtensions(),
|
extensions: defaultExtensions(),
|
||||||
content: this.value,
|
content: this.value,
|
||||||
onUpdate: () => {
|
onUpdate: () => {
|
||||||
|
// HTML
|
||||||
this.$emit('input', this.editor.getHTML())
|
this.$emit('input', this.editor.getHTML())
|
||||||
|
|
||||||
|
// JSON
|
||||||
|
// this.$emit('input', this.editor.getJSON())
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user