From 6b41f7c554589fe7ad0ccb8d898b9202d8f29838 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 28 Oct 2023 15:21:22 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9454 --- app/src/editor/util.ts | 3 +++ app/src/types/index.d.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index b706c7b00..75225536d 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -539,6 +539,9 @@ export const updatePanelByEditor = (options: { const models = getAllModels(); updateOutline(models, options.protyle, options.reload); updateBacklinkGraph(models, options.protyle); + options.protyle.app.plugins.forEach(item => { + item.eventBus.emit("switch-protyle", {protyle:options.protyle}); + }); }; export const isCurrentEditor = (blockId: string) => { diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts index c3b7c5247..a89287ba9 100644 --- a/app/src/types/index.d.ts +++ b/app/src/types/index.d.ts @@ -52,6 +52,7 @@ type TEventBus = "ws-main" | "paste" | "input-search" | "loaded-protyle" | "loaded-protyle-dynamic" | "loaded-protyle-static" | + "switch-protyle" | "destroy-protyle" type TAVCol = "text"