obsidian-semantic

Log | Files | Refs | README

commit 6e8aab961694fad6cb36808bce3179ae8fadb831
parent 99f40352142f79017458630581ff4032a8dfd7a3
Author: lishid <lishid@gmail.com>
Date:   Thu, 29 Oct 2020 18:02:57 -0400

Add more examples for hooks.

Diffstat:
Mmain.ts | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/main.ts b/main.ts @@ -35,8 +35,14 @@ export default class MyPlugin extends Plugin { this.addSettingTab(new SampleSettingTab(this.app, this)); this.registerEvent(this.app.on('codemirror', (cm: CodeMirror.Editor) => { - // Modify CodeMirror here... + console.log('codemirror', cm); })); + + this.registerDomEvent(document, 'click', (evt: MouseEvent) => { + console.log('click', evt); + }); + + this.registerInterval(window.setInterval(() => console.log('setInterval'), 5 * 60 * 1000)); } onunload() {