debug: 2.0.2版本编辑器API修改
This commit is contained in:
parent
41d5eb5297
commit
e131da3db0
|
@ -45,11 +45,11 @@ class ImageHandler {
|
|||
// 保存当前光标位置
|
||||
const range = this.quill.getSelection(true);
|
||||
if (!range) return;
|
||||
|
||||
|
||||
// 阻止Quill默认的粘贴处理
|
||||
const currentHtml = this.quill.root.innerHTML;
|
||||
this.quill.root.innerHTML = currentHtml;
|
||||
|
||||
|
||||
const file = items[i].getAsFile();
|
||||
this.upload(file, range, this);
|
||||
break;
|
||||
|
@ -63,7 +63,7 @@ class ImageHandler {
|
|||
}
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
|
||||
axios.post(process.env.VUE_APP_BASE_API + "/common/upload", formData, {
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
|
@ -176,7 +176,7 @@ export default {
|
|||
if (val !== this.currentValue) {
|
||||
this.currentValue = val === null ? "" : val;
|
||||
if (this.Quill) {
|
||||
this.Quill.pasteHTML(this.currentValue);
|
||||
this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user