diff --git a/src/components/CodemirrorEditor/InsertFormDialog.vue b/src/components/CodemirrorEditor/InsertFormDialog.vue index 3c720f4..ade2f24 100644 --- a/src/components/CodemirrorEditor/InsertFormDialog.vue +++ b/src/components/CodemirrorEditor/InsertFormDialog.vue @@ -27,9 +27,9 @@ function insertTable() { store.editor.operation(() => { store.editor.replaceSelection(`\n${table}\n`, `end`) }) - // store.editorRefresh() + store.editorRefresh() resetVal() - // formatContent() + formatContent() toggleShowInsertFormDialog() } diff --git a/src/views/CodemirrorEditor.vue b/src/views/CodemirrorEditor.vue index c7f3861..bacdb55 100644 --- a/src/views/CodemirrorEditor.vue +++ b/src/views/CodemirrorEditor.vue @@ -182,6 +182,7 @@ function uploaded(imageUrl) { // 将 Markdown 形式的 URL 插入编辑框光标所在位置 editor.value.replaceSelection(`\n${markdownImage}\n`, cursor) ElMessage.success(`图片上传成功`) + formatContent() onEditorRefresh() } function uploadImage(file, cb) {