Skip to content

Plugins.enablePluginAndSave method

Plugins › enablePluginAndSave

Unofficial

Enable a plugin by ID and save config for persistence.

Signature:

enablePluginAndSave(id: string): Promise<boolean>

Parameters:

ParameterTypeDescription
idstring{@link obsidian#Plugin} ID.

Returns: Promise<boolean> — A promise that resolves to true if the plugin was enabled and the config saved, or false if Plugins.enablePlugin refused it, in which case nothing is saved.