Commit f8be83f6 authored by 刘怀志's avatar 刘怀志

富文本编辑器统一修改

parent 6775e7fa
......@@ -110,6 +110,8 @@ export default {
this.currentValue = val === null ? '' : val
if (this.Quill) {
this.Quill.pasteHTML(this.currentValue)
const length = this.Quill.getLength()
this.Quill.setSelection(length)
}
}
},
......@@ -139,6 +141,8 @@ export default {
})
}
this.Quill.pasteHTML(this.currentValue)
const length = this.Quill.getLength()
this.Quill.setSelection(length)
this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML
const text = this.Quill.getText()
......@@ -270,4 +274,7 @@ export default {
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
content: "等宽字体";
}
.ql-editor.ql-blank::before {
font-style: normal;
}
</style>
......@@ -112,6 +112,8 @@ export default {
this.currentValue = val === null ? '' : val
if (this.Quill) {
this.Quill.pasteHTML(this.currentValue)
const length = this.Quill.getLength()
this.Quill.setSelection(length)
}
}
},
......@@ -141,6 +143,8 @@ export default {
})
}
this.Quill.pasteHTML(this.currentValue)
const length = this.Quill.getLength()
this.Quill.setSelection(length)
this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML
const text = this.Quill.getText()
......@@ -272,4 +276,7 @@ export default {
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
content: "等宽字体";
}
.ql-editor.ql-blank::before {
font-style: normal;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment