Vault.on('config-changed') method
Vault › on(‘config-changed’)
Unofficial
Called whenever any of Obsidian's settings are changed.Signature:
on(name: "config-changed", callback: (configKey: string) => void, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "config-changed" | Should be 'config-changed'. |
| callback | (configKey: string) => void | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Since: 0.9.7
Remarks:
Does *not* trigger when a particular plugin's settings are changed, for that, you could monkey-patch thesaveSettings method of a plugin instance.