Browse Source

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

Lowell 3 years ago
parent
commit
2fd0fd281e
1 changed files with 2 additions and 1 deletions
  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) {