Skip to content

Commit

Permalink
fix: insert table and upload images (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong authored Aug 20, 2024
1 parent c4c7b7f commit 28dcd05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CodemirrorEditor/InsertFormDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ function insertTable() {
store.editor.operation(() => {
store.editor.replaceSelection(`\n${table}\n`, `end`)
})
// store.editorRefresh()
store.editorRefresh()
resetVal()
// formatContent()
formatContent()
toggleShowInsertFormDialog()
}
</script>
Expand Down
1 change: 1 addition & 0 deletions src/views/CodemirrorEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ function uploaded(imageUrl) {
// 将 Markdown 形式的 URL 插入编辑框光标所在位置
editor.value.replaceSelection(`\n${markdownImage}\n`, cursor)
ElMessage.success(`图片上传成功`)
formatContent()
onEditorRefresh()
}
function uploadImage(file, cb) {
Expand Down

0 comments on commit 28dcd05

Please sign in to comment.