Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/8421

Vanessafd0893d8d8d3
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index 7d6d926603..348a9c5a68 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -270,6 +270,9 @@ const setHTML = (options: {
if (protyle.options.render.breadcrumb) {
protyle.breadcrumb.render(protyle);
}
+ app.plugins.forEach(item => {
+ item.eventBus.emit("loaded-protyle", protyle);
+ });
};
export const disabledForeverProtyle = (protyle: IProtyle) => {
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index ce1fe0ab65..8aa29f05f5 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -23,7 +23,7 @@ type TOperation =
type TBazaarType = "templates" | "icons" | "widgets" | "themes" | "plugins"
type TCardType = "doc" | "notebook" | "all"
type TEventBus = "ws-main" | "click-blockicon" | "click-editorcontent" | "click-pdf" |
- "click-editortitleicon" | "open-noneditableblock"
+ "click-editortitleicon" | "open-noneditableblock" | "loaded-protyle"
declare module "blueimp-md5"