mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
fix: insert table and upload images (#330)
This commit is contained in:
parent
c4c7b7fed7
commit
28dcd0599f
@ -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>
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user