From b6f7c417260ec253b8c18e1dae5e3984714e3fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 24 Mar 2021 22:57:26 +0100 Subject: [PATCH] refactoring --- docs/src/demos/Guide/GettingStarted/VModel/Editor.vue | 7 +++---- docs/src/docPages/installation/vue3.md | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue b/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue index 64956f21..54214554 100644 --- a/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue +++ b/docs/src/demos/Guide/GettingStarted/VModel/Editor.vue @@ -40,10 +40,9 @@ export default { this.editor = new Editor({ extensions: defaultExtensions(), content: this.value, - }) - - this.editor.on('update', () => { - this.$emit('input', this.editor.getHTML()) + onUpdate: () => { + this.$emit('input', this.editor.getHTML()) + }, }) }, diff --git a/docs/src/docPages/installation/vue3.md b/docs/src/docPages/installation/vue3.md index bbba831a..0818070b 100644 --- a/docs/src/docPages/installation/vue3.md +++ b/docs/src/docPages/installation/vue3.md @@ -173,10 +173,9 @@ export default { this.editor = new Editor({ content: this.modelValue, extensions: defaultExtensions(), - }) - - this.editor.on('update', () => { - this.$emit('update:modelValue', this.editor.getHTML()) + onUpdate: () => { + this.$emit('update:modelValue', this.editor.getHTML()) + }, }) },