mirror of
https://github.com/groldsf/obsidian_check_plugin.git
synced 2026-07-22 12:00:31 +00:00
fix callback
This commit is contained in:
parent
e2e6c47920
commit
bb609c2685
1 changed files with 3 additions and 3 deletions
|
|
@ -24,15 +24,15 @@ export default class CheckboxSyncPlugin extends Plugin {
|
|||
|
||||
//запуск плагина при открытии файла
|
||||
this.registerEvent(
|
||||
this.app.workspace.on("file-open", async (file) => await this.syncController.syncFile(file))
|
||||
this.app.workspace.on("file-open", this.syncController.syncFile.bind(this.syncController))
|
||||
);
|
||||
//запуск плагина при модификации файла(для обработки в режиме просмотра)
|
||||
this.registerEvent(
|
||||
this.app.vault.on("modify", async (file: TFile) => await this.syncController.syncFile(file))
|
||||
this.app.vault.on("modify", this.syncController.syncFile.bind(this.syncController))
|
||||
);
|
||||
//запуск плагина при изменении в режиме редактора
|
||||
this.registerEvent(
|
||||
this.app.workspace.on("editor-change", async (editor) => await this.syncController.syncEditor(editor))
|
||||
this.app.workspace.on("editor-change", this.syncController.syncEditor.bind(this.syncController))
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue