Skip to content

obsidian/command-handlers/command-handler-component

Component that registers CommandHandlers with Obsidian and ties their removal to its lifecycle.

ClassDescription
CommandHandlerComponentRegisters CommandHandlers with Obsidian and manages their lifecycle. Call registerCommandHandlers to register a batch of handlers on demand (as many times as needed while the component is alive); dispose the returned DisposableEx to unregister exactly those handlers — including any menu events they registered — or let the component unload to remove every command still registered through it.