Skip to content

installAndEnablePlugin

Installs (when needed) and enables another plugin, reporting the outcome as a notice.

A no-op when the plugin is already enabled, so a caller reacting to a click need not check first.

Import:

import { installAndEnablePlugin } from '@mnaoumov/obsidian-lib/plugin/plugin-install-state';

Signature:

function installAndEnablePlugin(params: InstallAndEnablePluginParams): Promise<void>

Parameters:

Parameter Type Description
params InstallAndEnablePluginParams The InstallAndEnablePluginParams.

Returns: Promise<void> — A Promise that resolves once the plugin is enabled.


Links to this page: