Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 3a5749d

Browse files
committed
Add event listers to the component as well as the event bus
1 parent bfc603e commit 3a5749d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Quill.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@
108108
this.editor.root.innerHTML = html
109109
})
110110
}
111+
112+
this.$on('focus-editor', () => this.focusEditor())
113+
this.$on('set-content', (content) => this.editor.setContents(content))
114+
this.$on('set-html', (html) => {
115+
if (!html || html === '') return
116+
117+
this.editor.root.innerHTML = html
118+
})
111119
},
112120
113121
methods: {

0 commit comments

Comments
 (0)