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"