CommandSwitches
A read-only view of the user’s command switches, read by command handlers each time a menu is built.
Import:
import type { CommandSwitches } from '@mnaoumov/obsidian-lib/command-handlers/command-switches';Signature:
export interface CommandSwitchesProperties
| Property | Type | Description |
|---|---|---|
| isCommandShownInMenus | (commandId: string) => boolean | Whether the user's switches let a command into the context menus. A hidden command still runs from the command palette and its hotkeys: the switches govern the menus only. |
| shouldAddCommandsToSubmenu | boolean | Whether the plugin's context-menu commands are grouped under one submenu entry. |
Links to this page: