Merge pull request #67 from nagisa77/codex/fix-uncaught-runtime-error-with-vditor

Fix Vditor init timing
This commit is contained in:
Tim
2025-07-04 16:41:21 +08:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -60,7 +60,10 @@ export default {
'link',
'image'
],
toolbarConfig: { pin: true }
toolbarConfig: { pin: true },
after() {
vditorInstance.value = this
}
})
})

View File

@@ -57,9 +57,11 @@ export default {
cache: { enable: false },
input(value) {
emit('update:modelValue', value)
},
after() {
vditorInstance.value.setValue(props.modelValue)
}
})
vditorInstance.value.setValue(props.modelValue)
})
return {}