Vault.on('modify') method
Vault › on(‘modify’)
Official
Called when a file is modified.Signature:
on(name: "modify", callback: (file: TAbstractFile) => unknown, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "modify" | Should be 'modify'. |
| callback | (file: TAbstractFile) => unknown | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Example:
app.vault.on('modify', (file) => { console.log(file);});