Skip to content

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): EventRef

Parameters:

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: EventRefThe event reference.

Since: 0.9.7

Remarks:

Does *not* trigger when a particular plugin's settings are changed, for that, you could monkey-patch the saveSettings method of a plugin instance.