PluginCommandRegistrar
A command registrar that adds commands to a plugin.
Import:
import { PluginCommandRegistrar } from '@mnaoumov/obsidian-lib/command-registrar';Signature:
export class PluginCommandRegistrar implements CommandRegistrarImplements: CommandRegistrar
Constructor
new PluginCommandRegistrar(plugin: Plugin)Creates a new plugin command registrar.
Properties
| Property | Type | Description |
|---|---|---|
| addCommand | (command: Command) => void | Adds a command to the registrar. (Inherited from CommandRegistrar) |
| removeCommand | (commandId: string) => void | Removes a command from the registrar. (Inherited from CommandRegistrar) |
Methods
| Method | Returns | Description |
|---|---|---|
| addCommand(command) | void | Adds a command to the plugin. |
| removeCommand(commandId) | void | Removes a command from the plugin. |