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/8374

Vanessa4704284ad2e2
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 2945dbbe91..f20e394d35 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -1199,6 +1199,12 @@ export class Toolbar {
if (!protyle.disabled) {
textElement.select();
}
+ this.app.plugins.forEach(item => {
+ item.eventBus.emit("open-noneditableblock", {
+ protyle,
+ toolbar: this
+ });
+ });
}
public showCodeLanguage(protyle: IProtyle, languageElement: HTMLElement) {
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index d417a4f9cd..c70777121c 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -22,7 +22,8 @@ type TOperation =
| "removeFlashcards"
type TBazaarType = "templates" | "icons" | "widgets" | "themes" | "plugins"
type TCardType = "doc" | "notebook" | "all"
-type TEventBus = "ws-main" | "click-blockicon" | "click-editorcontent" | "click-pdf" | "click-editortitleicon"
+type TEventBus = "ws-main" | "click-blockicon" | "click-editorcontent" | "click-pdf" |
+ "click-editortitleicon" | "open-noneditableblock"
declare module "blueimp-md5"