Skip to content

Commit 251b3d2

Browse files
Vanessa219appdev
authored andcommitted
1 parent 744dad9 commit 251b3d2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/src/editor/util.ts

+3
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@ export const updatePanelByEditor = (options: {
539539
const models = getAllModels();
540540
updateOutline(models, options.protyle, options.reload);
541541
updateBacklinkGraph(models, options.protyle);
542+
options.protyle.app.plugins.forEach(item => {
543+
item.eventBus.emit("switch-protyle", {protyle:options.protyle});
544+
});
542545
};
543546

544547
export const isCurrentEditor = (blockId: string) => {

app/src/types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type TEventBus = "ws-main" |
5252
"paste" |
5353
"input-search" |
5454
"loaded-protyle" | "loaded-protyle-dynamic" | "loaded-protyle-static" |
55+
"switch-protyle" |
5556
"destroy-protyle"
5657
type TAVCol =
5758
"text"

0 commit comments

Comments
 (0)