Skip to content

InternalPlugins

Unofficial

Manager for all internal (core) plugins, handling registration, enabling, and configuration.

Import:

import type { InternalPlugins } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface InternalPlugins extends Events

Extends: Events

Constructor

new InternalPlugins(app: App)

Constructor.

To get the constructor instance, use getInternalPluginsConstructor from obsidian-typings/implementations.

Properties

Property Type Description
_ Record<string, EventsEntry[]> Internal storage of registered event handlers by event name.
(Inherited from Events)
app App Reference to the obsidian#App.
config InternalPluginsConfigRecord Mapping of whether an internal plugin is enabled.
plugins InternalPluginNamePluginsMapping obsidian#Plugin configs for internal plugins.
requestSaveConfig Debouncer<[], Promise<void>> Request save of plugin configs.

Methods

Method Returns Description
enable() Promise<void> Load plugin configs and enable plugins.
getEnabledPluginById(id) InternalPluginNameInstancesMapping[ID] | null Get an enabled internal plugin by ID.
getEnabledPlugins() InternalPlugin<unknown>[] Get all enabled internal plugins.
getPluginById(id) InternalPluginNamePluginsMapping[ID] | null Get an internal plugin by ID.
loadPlugin(internalPluginInstance) Instance Load and register an internal plugin instance.
off(name, callback) void Remove an event listener.
(Inherited from Events)
offref(ref) void Remove an event listener by reference.
(Inherited from Events)
on(name, callback, ctx?) EventRef Add an event listener.
(Inherited from Events)
onRaw(configPath) void Handle raw file change events for the config path.
saveConfig() Promise<void> Save current plugin configs.
trigger(name, data?) void Trigger an event, executing all the listeners in order even if some of them throw an error.
(Inherited from Events)
tryTrigger(evt, args) void Try to trigger an event, executing all the listeners in order even if some of them throw an error.
(Inherited from Events)

Links to this page: