This commit is contained in:
frostime 2023-08-15 10:43:52 +08:00
parent 4fc8ef7afc
commit 811519bfd8
4 changed files with 41 additions and 3 deletions

View file

@ -108,7 +108,16 @@ export default class PluginSample extends Plugin {
hotkey: "⇧⌘M",
callback: () => {
this.showDialog();
}
},
fileTreeCallback: (file: any) => {
console.log(file, "fileTreeCallback");
},
editorCallback: (protyle: any) => {
console.log(protyle, "editorCallback");
},
dockCallback: (element: HTMLElement) => {
console.log(element, "dockCallback");
},
});
this.addDock({
@ -536,6 +545,30 @@ export default class PluginSample extends Plugin {
click: () => {
this.eventBus.off("input-search", this.eventBusLog);
}
}, {
icon: "iconSelect",
label: "On open-siyuan-url-plugin",
click: () => {
this.eventBus.on("open-siyuan-url-plugin", this.eventBusLog);
}
}, {
icon: "iconClose",
label: "Off open-siyuan-url-plugin",
click: () => {
this.eventBus.off("open-siyuan-url-plugin", this.eventBusLog);
}
}, {
icon: "iconSelect",
label: "On open-siyuan-url-block",
click: () => {
this.eventBus.on("open-siyuan-url-block", this.eventBusLog);
}
}, {
icon: "iconClose",
label: "Off open-siyuan-url-block",
click: () => {
this.eventBus.off("open-siyuan-url-block", this.eventBusLog);
}
}]
});
menu.addSeparator();