Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/app/core/article/md-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ export function MdEditor() {
input: (value) => {
saveCurrentArticle(value)
emitter.emit('editor-input')
handleLocalImage(vditor)
setTimeout(() => {
handleLocalImage(vditor)
}, 1100)

},
mode: localMode,
upload: {
Expand Down Expand Up @@ -193,7 +196,7 @@ export function MdEditor() {
// 处理本地相对路径图片
async function handleLocalImage(vditor: Vditor) {
const workspace = await getWorkspacePath()
const previews = [vditor.vditor.ir?.element, vditor.vditor.sv?.element, vditor.vditor.wysiwyg?.element]
const previews = [vditor.vditor.ir?.element, vditor.vditor.sv?.element, vditor.vditor.wysiwyg?.element,vditor.vditor.preview?.element]
previews.forEach(element => {
element?.querySelectorAll('img').forEach(async (img) => {
let src = img.getAttribute('src')
Expand Down