BasesPluginInstance
Unofficial
Bases plugin instance.
Import:
import type { BasesPluginInstance } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface BasesPluginInstance extends InternalPluginInstance<BasesPlugin>Extends: InternalPluginInstance<BasesPlugin>
Properties
| Property | Type | Description | |
|---|---|---|---|
| app | App | An Obsidian app instance. | |
| defaultOn | boolean | Whether the default on. | |
| description | string | Human-readable description of this plugin. (Inherited from InternalPluginInstance) | |
| id | string | Unique identifier for this plugin. (Inherited from InternalPluginInstance) | |
| name | string | Human-readable display name of this plugin. (Inherited from InternalPluginInstance) | |
| registrations | BasesViewRegistrations | The Bases view registrations, keyed by view type. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| 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) | void | Deregisters a view. | |
| getRegistration(type) | BasesViewRegistration | null | Gets a Bases view registration. | |
| getRegistrations() | BasesViewRegistrations | Gets all Bases view registrations. | |
| getViewFactory(type) | BasesViewFactory | null | Gets the factory of a Bases view registration. | |
| init(app, plugin) | void | Initialize the plugin instance with app and plugin references. (Inherited from InternalPluginInstance) | |
| onDisable(app, plugin) | void | Called when the plugin is disabled. (Inherited from InternalPluginInstance) | |
| onEditorMenu(menu, editor) | void | Adds 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?) | void | On file menu. | |
| onUserDisable(app) | void | Called when the user manually disables the plugin. (Inherited from InternalPluginInstance) | |
| onUserEnable(app) | void | Called when the user manually enables the plugin. (Inherited from InternalPluginInstance) | |
| registerView(type, registration) | void | Registers a Bases view. Shows an error notice instead when a view of that type is already registered. |
Links to this page: