CommandHandlerComponent.registerCommandHandlers method
CommandHandlerComponent › registerCommandHandlers
Registers the given command handlers with Obsidian and provides each its own runtime registration context. Each handler's command is added immediately; the returned DisposableEx removes the commands registered by this call — and any menu events those handlers registered via their context's MenuEventRegistrar — when disposed. Any command still registered when the component unloads is removed automatically.Signature:
registerCommandHandlers(commandHandlers: CommandHandler[]): DisposableExParameters:
| Parameter | Type | Description |
|---|---|---|
| commandHandlers | CommandHandler[] | The command handlers to register. |
Returns: DisposableEx — A DisposableEx that unregisters the handlers (commands + menu events) passed to this call.