From 08bf68de828fa36dab47d2bb4ccc6c09b1b12b3b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 24 Aug 2023 12:19:21 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9033 --- CHANGELOG.md | 2 ++ src/index.ts | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81df6a3..2323871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.2.2 2023-08 +* [Add plugin event bus `destroy-protyle`](https://github.com/siyuan-note/siyuan/issues/9033) +* [Add plugin event bus `loaded-protyle-dynamic`](https://github.com/siyuan-note/siyuan/issues/9021) ## 0.2.1 2023-08-21 diff --git a/src/index.ts b/src/index.ts index 4dc6085..bfcec42 100644 --- a/src/index.ts +++ b/src/index.ts @@ -445,6 +445,30 @@ export default class PluginSample extends Plugin { click: () => { this.eventBus.off("loaded-protyle", this.eventBusLog); } + }, { + icon: "iconSelect", + label: "On loaded-protyle-dynamic", + click: () => { + this.eventBus.on("loaded-protyle-dynamic", this.eventBusLog); + } + }, { + icon: "iconClose", + label: "Off loaded-protyle-dynamic", + click: () => { + this.eventBus.off("loaded-protyle-dynamic", this.eventBusLog); + } + }, { + icon: "iconSelect", + label: "On destroy-protyle", + click: () => { + this.eventBus.on("destroy-protyle", this.eventBusLog); + } + }, { + icon: "iconClose", + label: "Off destroy-protyle", + click: () => { + this.eventBus.off("destroy-protyle", this.eventBusLog); + } }, { icon: "iconSelect", label: "On open-menu-blockref",