浏览代码

fix: the position of tinymce upload image is wrong (#1015)

Lowell 3 年之前
父节点
当前提交
2fd0fd281e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/components/Tinymce/src/Editor.vue

+ 2 - 1
src/components/Tinymce/src/Editor.vue

@@ -278,8 +278,9 @@
         if (!editor) {
           return;
         }
+        editor.execCommand('mceInsertContent', false, getUploadingImgName(name));
         const content = editor?.getContent() ?? '';
-        setValue(editor, `${content}\n${getUploadingImgName(name)}`);
+        setValue(editor, content);
       }
 
       function handleDone(name: string, url: string) {