fix: insert table and upload images (#330)

This commit is contained in:
YangFong 2024-08-20 10:18:35 +08:00 committed by GitHub
parent c4c7b7fed7
commit 28dcd0599f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -27,9 +27,9 @@ function insertTable() {
store.editor.operation(() => { store.editor.operation(() => {
store.editor.replaceSelection(`\n${table}\n`, `end`) store.editor.replaceSelection(`\n${table}\n`, `end`)
}) })
// store.editorRefresh() store.editorRefresh()
resetVal() resetVal()
// formatContent() formatContent()
toggleShowInsertFormDialog() toggleShowInsertFormDialog()
} }
</script> </script>

View File

@ -182,6 +182,7 @@ function uploaded(imageUrl) {
// Markdown URL // Markdown URL
editor.value.replaceSelection(`\n${markdownImage}\n`, cursor) editor.value.replaceSelection(`\n${markdownImage}\n`, cursor)
ElMessage.success(`图片上传成功`) ElMessage.success(`图片上传成功`)
formatContent()
onEditorRefresh() onEditorRefresh()
} }
function uploadImage(file, cb) { function uploadImage(file, cb) {