Forráskód Böngészése

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

Vanessa 2 éve
szülő
commit
4704284ad2
2 módosított fájl, 8 hozzáadás és 1 törlés
  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) {
         if (!protyle.disabled) {
             textElement.select();
             textElement.select();
         }
         }
+        this.app.plugins.forEach(item => {
+            item.eventBus.emit("open-noneditableblock", {
+                protyle,
+                toolbar: this
+            });
+        });
     }
     }
 
 
     public showCodeLanguage(protyle: IProtyle, languageElement: HTMLElement) {
     public showCodeLanguage(protyle: IProtyle, languageElement: HTMLElement) {

+ 2 - 1
app/src/types/index.d.ts

@@ -22,7 +22,8 @@ type TOperation =
     | "removeFlashcards"
     | "removeFlashcards"
 type TBazaarType = "templates" | "icons" | "widgets" | "themes" | "plugins"
 type TBazaarType = "templates" | "icons" | "widgets" | "themes" | "plugins"
 type TCardType = "doc" | "notebook" | "all"
 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"
 declare module "blueimp-md5"