fix: the rawType of Content was not updated when switching editors

pull/911/head
Ryan Wang 2023-03-15 11:34:16 +08:00 committed by halo-dev-bot
parent 50557ce318
commit 0e7c6a4cf0
2 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,7 @@ const handleChangeEditorProvider = (provider: EditorProvider) => {
formState.value.page.metadata.annotations = { formState.value.page.metadata.annotations = {
"content.halo.run/preferred-editor": provider.name, "content.halo.run/preferred-editor": provider.name,
}; };
formState.value.content.rawType = provider.rawType;
}; };
// SinglePage form // SinglePage form

View File

@ -48,6 +48,7 @@ const handleChangeEditorProvider = (provider: EditorProvider) => {
formState.value.post.metadata.annotations = { formState.value.post.metadata.annotations = {
"content.halo.run/preferred-editor": provider.name, "content.halo.run/preferred-editor": provider.name,
}; };
formState.value.content.rawType = provider.rawType;
}; };
// Post form // Post form