fix: 修复编辑模式下 Vditor 不加载稿件内容
- 创作中心编辑文章时,after 回调中显式调用 vditor.setValue(initialMD) - 修复 Vditor 3.x wysiwyg 模式下 value 选项可能不渲染内容的问题
This commit is contained in:
@ -85,6 +85,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
after() {
|
||||
if (!isEdit) {
|
||||
setTimeout(() => restoreDraft(), 100)
|
||||
} else if (initialMD) {
|
||||
// 编辑模式:显式设置稿件内容,确保正确加载
|
||||
vditor.setValue(initialMD)
|
||||
}
|
||||
updateWordCount()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user