PromptParams
Options for prompt.
Import:
import type { PromptParams } from 'obsidian-dev-utils/obsidian/modals/prompt';Signature:
export interface PromptParams extends ModalParamsBaseExtends: ModalParamsBase
Properties
| Property | Type | Description |
|---|---|---|
| app | App | An Obsidian app instance. (Inherited from ModalParamsBase) |
| cancelButtonText? | string | A text for the "Cancel" button. |
| commandBuilder? | ModalCommandBuilder | Extra controls — checkboxes, dropdowns and keyboard shortcuts — rendered as a strip along the bottom of the modal, so a caller gets a text input plus options with no bespoke modal of its own. Hand it a configured ModalCommandBuilder; the modal builds it. The strip is rendered after the buttons, so it sits along the bottom edge where a SuggestModal's instruction bar sits. |
| commandsRenderMode? | ModalCommandsRenderMode | The way PromptParams.commandBuilder's controls are rendered. |
| cssClasses? | string[] | A CSS class to apply to the modal. (Inherited from ModalParamsBase) |
| defaultValue? | string | A default value to pre-fill the input field. |
| okButtonText? | string | A text for the "OK" button. |
| placeholder? | string | A placeholder text for the input field. |
| title? | DocumentFragment | string | A title of the modal. |
Methods
| Method | Returns | Description |
|---|---|---|
| valueValidator(this, value) | Promisable<MaybeReturn<string>> | A function to validate the input value. |
Links to this page: