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

PropertyTypeDescription
_Record<string, EventsEntry[]>Internal storage of registered event handlers by event name.
(Inherited from Events)
appAppReference to the obsidian#App.
configInternalPluginsConfigRecordMapping of whether an internal plugin is enabled.
pluginsInternalPluginNamePluginsMappingobsidian#Plugin configs for internal plugins.
requestSaveConfigDebouncer<[], Promise<void>>Request save of plugin configs.

Methods

MethodReturnsDescription
enable()Promise<void>Load plugin configs and enable plugins.
getEnabledPluginById(id)InternalPluginNameInstancesMapping[ID] | nullGet an enabled internal plugin by ID.
getEnabledPlugins()InternalPlugin<unknown>[]Get all enabled internal plugins.
getPluginById(id)InternalPluginNamePluginsMapping[ID] | nullGet an internal plugin by ID.
loadPlugin(internalPluginInstance)InstanceLoad and register an internal plugin instance.
off(name, callback)voidRemove an event listener.
(Inherited from Events)
offref(ref)voidRemove an event listener by reference.
(Inherited from Events)
on(name, callback, ctx?)EventRefAdd an event listener.
(Inherited from Events)
onRaw(configPath)voidHandle raw file change events for the config path.
saveConfig()Promise<void>Save current plugin configs.
trigger(name, data?)voidTrigger an event, executing all the listeners in order even if some of them throw an error.
(Inherited from Events)
tryTrigger(evt, args)voidTry 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: