docs: update content

This commit is contained in:
Hans Pagel
2021-03-25 09:52:41 +01:00
parent 5f599c45b9
commit c1b5bb194f

View File

@@ -26,8 +26,12 @@ export default {
watch: {
value(value) {
// HTML
const isSame = this.editor.getHTML() === value
// JSON
// const isSame = this.editor.getJSON().toString() === value.toString()
if (isSame) {
return
}
@@ -41,7 +45,11 @@ export default {
extensions: defaultExtensions(),
content: this.value,
onUpdate: () => {
// HTML
this.$emit('input', this.editor.getHTML())
// JSON
// this.$emit('input', this.editor.getJSON())
},
})
},