From 8cc7752ceaa41a126c47f7fddb24c85c0002b259 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 23 May 2023 19:53:17 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8335 --- app/src/protyle/header/Title.ts | 7 +++++++ app/src/types/index.d.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts index ec9ebc00c..1bdeb4957 100644 --- a/app/src/protyle/header/Title.ts +++ b/app/src/protyle/header/Title.ts @@ -411,6 +411,13 @@ export class Title { ${window.siyuan.languages.createdAt} ${dayjs(response.data.ial.id.substr(0, 14)).format("YYYY-MM-DD HH:mm:ss")}` }).element); window.siyuan.menus.menu.popup(position); + this.app?.plugins?.forEach((plugin) => { + plugin.eventBus.emit("click-editortitleicon", { + protyle, + menu: window.siyuan.menus.menu, + data: response.data, + }); + }); }); } diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts index ec45843c6..69e408c06 100644 --- a/app/src/types/index.d.ts +++ b/app/src/types/index.d.ts @@ -22,7 +22,7 @@ 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" +type TEventBus = "ws-main" | "click-blockicon" | "click-editorcontent" | "click-pdf" | "click-editortitleicon" declare module "blueimp-md5"