Skip to content

BasesPluginInstance

Unofficial

Bases plugin instance.

Import:

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

Signature:

export interface BasesPluginInstance extends InternalPluginInstance<BasesPlugin>

Extends: InternalPluginInstance<BasesPlugin>

Properties

PropertyTypeDescription
appAppAn Obsidian app instance.
defaultOnbooleanWhether the default on.
descriptionstringHuman-readable description of this plugin.
(Inherited from InternalPluginInstance)
idstringUnique identifier for this plugin.
(Inherited from InternalPluginInstance)
namestringHuman-readable display name of this plugin.
(Inherited from InternalPluginInstance)
registrationsBasesViewRegistrationsThe Bases view registrations, keyed by view type.

Methods

MethodReturnsDescription
createAndEmbedBase(editor)Promise<void>Creates and embeds a base.
createAndOpenBase(evt?)Promise<void>Creates a new base next to the active file and opens it for renaming.
createNewBasesFile(location?, filename?, contents?)Promise<TFile>Creates a new bases file.
deregisterView(type)voidDeregisters a view.
getRegistration(type)BasesViewRegistration | nullGets a Bases view registration.
getRegistrations()BasesViewRegistrationsGets all Bases view registrations.
getViewFactory(type)BasesViewFactory | nullGets the factory of a Bases view registration.
init(app, plugin)voidInitialize the plugin instance with app and plugin references.
(Inherited from InternalPluginInstance)
onDisable(app, plugin)voidCalled when the plugin is disabled.
(Inherited from InternalPluginInstance)
onEditorMenu(menu, editor)voidAdds the "new base" item to the editor context menu.
onEnable(app, plugin)Promise<void>Called when the plugin is enabled.
(Inherited from InternalPluginInstance)
onFileMenu(menu, file, source, leaf?)voidOn file menu.
onUserDisable(app)voidCalled when the user manually disables the plugin.
(Inherited from InternalPluginInstance)
onUserEnable(app)voidCalled when the user manually enables the plugin.
(Inherited from InternalPluginInstance)
registerView(type, registration)voidRegisters a Bases view. Shows an error notice instead when a view of that type is already registered.

Links to this page: