SuggestModalCommandBuilder
Builds a SuggestModal’s instruction bar from keyboard commands, interactive checkboxes, and dropdowns, then applies them to a modal via SuggestModalCommandBuilder.build.
Import:
import { SuggestModalCommandBuilder } from 'obsidian-dev-utils/obsidian/modals/suggest-modal-command-builder';Signature:
export class SuggestModalCommandBuilderMethods
| Method | Returns | Description |
|---|---|---|
| addCheckbox(command) | this | Adds an interactive checkbox to the instruction bar, bound to a modifier+key shortcut that toggles it. |
| addDropDown(command) | this | Adds a dropdown to the instruction bar, bound to a modifier+key shortcut that cycles through its options. |
| addKeyboardCommand(command) | this | Adds a keyboard command to the instruction bar. When KeyboardCommand.onKey is provided, its handler is registered with the modal scope; otherwise the command is a hint only. |
| build(modal, options?) | void | Applies the accumulated commands to a modal. Always registers the essential navigation/action key handlers; only renders the instruction UI and registers the option-toggle shortcuts when SuggestModalCommandBuilderBuildOptions.shouldShowInstructions is true. |