mirror of
https://github.com/runofthemillgeek/swarnam-obsidian.git
synced 2024-11-16 07:20:16 +00:00
Add more examples for hooks.
This commit is contained in:
parent
99f4035214
commit
6e8aab9616
8
main.ts
8
main.ts
@ -35,8 +35,14 @@ export default class MyPlugin extends Plugin {
|
|||||||
this.addSettingTab(new SampleSettingTab(this.app, this));
|
this.addSettingTab(new SampleSettingTab(this.app, this));
|
||||||
|
|
||||||
this.registerEvent(this.app.on('codemirror', (cm: CodeMirror.Editor) => {
|
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() {
|
onunload() {
|
||||||
|
Loading…
Reference in New Issue
Block a user