diff --git a/examples/02-example.vue b/examples/02-example.vue index 4b704f9..e1ac540 100644 --- a/examples/02-example.vue +++ b/examples/02-example.vue @@ -74,8 +74,8 @@ } }, methods: { - onEditorChange({ editor, html, text }) { - // console.log('editor change!', editor, html, text) + onEditorChange({ editor, html, text, quillEvent }) { + // console.log('editor change!', editor, html, text, quillEvent) this.content = html } }, diff --git a/examples/nuxt-ssr-example/nuxt-ssr-example.vue b/examples/nuxt-ssr-example/nuxt-ssr-example.vue index 2f2b6ac..a660101 100644 --- a/examples/nuxt-ssr-example/nuxt-ssr-example.vue +++ b/examples/nuxt-ssr-example/nuxt-ssr-example.vue @@ -43,8 +43,8 @@ onEditorReady(editor) { console.log('editor ready!', editor) }, - onEditorChange({ editor, html, text }) { - console.log('editor change!', editor, html, text) + onEditorChange({ editor, html, text, quillEvent }) { + console.log('editor change!', editor, html, text, quillEvent) this.content = html } } diff --git a/src/editor.vue b/src/editor.vue index 46f7763..5888d7c 100644 --- a/src/editor.vue +++ b/src/editor.vue @@ -104,14 +104,14 @@ }) // Update model if text changes - this.quill.on('text-change', (delta, oldDelta, source) => { + this.quill.on('text-change', (delta, oldContents, source) => { let html = this.$refs.editor.children[0].innerHTML const quill = this.quill const text = this.quill.getText() if (html === '