Parcourir la source

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

Vanessa il y a 2 ans
Parent
commit
4704284ad2
2 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 6 0
      app/src/protyle/toolbar/index.ts
  2. 2 1
      app/src/types/index.d.ts

+ 6 - 0
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) {

+ 2 - 1
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"