From c1b5bb194fbfcc5020a705d7656a669f5adcfe1b Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 25 Mar 2021 09:52:41 +0100 Subject: [PATCH] docs: update content --- docs/src/demos/Guide/GettingStarted/VModel/Editor.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue b/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue index 54214554..f5de7760 100644 --- a/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue +++ b/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue @@ -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()) }, }) },