Skip to content

obsidian/command-handlers/editor-command-handler

Command handler for editor commands with optional editor menu integration.

ClassDescription
EditorCommandHandlerCommand handler for editor commands. Subclasses override canExecuteEditor and executeEditor to provide behavior. Optionally integrates with the editor context menu via shouldAddToEditorMenu, and with the markdown viewport (margin) menu via shouldAddToViewportMenu.
InterfaceDescription
EditorCommandHandlerConstructorParamsParameters for creating an editor command handler.
EditorCommandHandlerEditorCheckCallbackParamsParameters for EditorCommandHandler.editorCheckCallback.
EditorCommandHandlerHandleEditorMenuParamsParameters for EditorCommandHandler.handleEditorMenu.
EditorCommandHandlerHandleViewportMenuParamsParameters for EditorCommandHandler.handleViewportMenu.