debug: 2.0.2版本编辑器API修改

This commit is contained in:
磷叶 2025-04-08 18:47:17 +08:00
parent 41d5eb5297
commit e131da3db0

View File

@ -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);
}
}
},