Skip to content

Plugins.enablePlugin method

Plugins › enablePlugin

Unofficial

Enable a plugin by ID.

Signature:

enablePlugin(id: string, isUserEnabled?: boolean | undefined): Promise<boolean>

Parameters:

ParameterTypeDescription
idstring{@link obsidian#Plugin} ID.
isUserEnabled?boolean | undefinedWhether the plugin was enabled by the user.

Returns: Promise<boolean> — A promise that resolves to true if the plugin was loaded, or false if it was refused (unknown, deprecated or desktop-only plugin) or threw while loading.