fix: the issue of blank content when opening a saved post in StackEdit editor plugin for editing

pull/908/head
Ryan Wang 2023-03-15 11:31:32 +08:00 committed by halo-dev-bot
parent b0d19acc16
commit 5ccbb99b38
2 changed files with 4 additions and 4 deletions

View File

@ -208,6 +208,8 @@ const handleFetchContent = async () => {
snapshotName: formState.value.page.spec.headSnapshot,
});
formState.value.content = Object.assign(formState.value.content, data);
// get editor provider
if (!currentEditorProvider.value) {
const preferredEditor = editorProviders.value.find(
@ -249,8 +251,6 @@ const handleFetchContent = async () => {
}
await nextTick();
}
formState.value.content = Object.assign(formState.value.content, data);
};
// SinglePage settings

View File

@ -213,6 +213,8 @@ const handleFetchContent = async () => {
snapshotName: formState.value.post.spec.headSnapshot,
});
formState.value.content = Object.assign(formState.value.content, data);
// get editor provider
if (!currentEditorProvider.value) {
const preferredEditor = editorProviders.value.find(
@ -256,8 +258,6 @@ const handleFetchContent = async () => {
await nextTick();
}
formState.value.content = Object.assign(formState.value.content, data);
};
const handleOpenSettingModal = async () => {