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 'obsidian-dev-utils/obsidian/plugin/plugin-install-state';

Signature:

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

Parameters:

ParameterTypeDescription
paramsInstallAndEnablePluginParamsThe InstallAndEnablePluginParams.

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


Links to this page: