Skip to content

Commit a4a01ba

Browse files
committed
applied patch surmon-china#197
1 parent 1566e2a commit a4a01ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/vue-quill-editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/editor.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
111111
// Set editor content
112112
if (this.value || this.content) {
113-
this.quill.pasteHTML(this.value || this.content)
113+
this.quill.setContents(this.quill.clipboard.convert(this.value || this.content))
114114
}
115115
116116
// Disabled editor
@@ -149,7 +149,7 @@
149149
if (this.quill) {
150150
if (newVal && newVal !== this._content) {
151151
this._content = newVal
152-
this.quill.pasteHTML(newVal)
152+
this.quill.setContents(this.quill.clipboard.convert(newVal))
153153
} else if(!newVal) {
154154
this.quill.setText('')
155155
}
@@ -160,7 +160,7 @@
160160
if (this.quill) {
161161
if (newVal && newVal !== this._content) {
162162
this._content = newVal
163-
this.quill.pasteHTML(newVal)
163+
this.quill.setContents(this.quill.clipboard.convert(newVal))
164164
} else if(!newVal) {
165165
this.quill.setText('')
166166
}

0 commit comments

Comments
 (0)