Skip to main content

Interface: InputBoxOptions

Options to configure the behavior of the input box UI.

Properties

ignoreFocusOut?

optional ignoreFocusOut: boolean

Set to true to keep the input box open when focus moves to another part of the editor or to another window. This setting is ignored on iPad and is always false.

Source

packages/extension-api/src/extension-api.d.ts:846


markdownDescription?

optional markdownDescription: string

A description of the field to be show (Markdown format)

Source

packages/extension-api/src/extension-api.d.ts:830


multiline?

optional multiline: boolean

Set to true when value represents a multi line content.

Source

packages/extension-api/src/extension-api.d.ts:851


password?

optional password: boolean

Controls if a password input is shown. Password input hides the typed text.

Source

packages/extension-api/src/extension-api.d.ts:840


placeHolder?

optional placeHolder: string

An optional string to show as placeholder in the input box to guide the user what to type.

Source

packages/extension-api/src/extension-api.d.ts:835


prompt?

optional prompt: string

The text to display underneath the input box.

Source

packages/extension-api/src/extension-api.d.ts:825


title?

optional title: string

An optional string that represents the title of the input box.

Source

packages/extension-api/src/extension-api.d.ts:807


value?

optional value: string

The value to pre-fill in the input box.

Source

packages/extension-api/src/extension-api.d.ts:812


valueSelection?

optional valueSelection: [number, number]

Selection of the pre-filled value. Defined as tuple of two number where the first is the inclusive start index and the second the exclusive end index. When undefined the whole pre-filled value will be selected, when empty (start equals end) only the cursor will be set, otherwise the defined range will be selected.

Source

packages/extension-api/src/extension-api.d.ts:820

Methods

validateInput()?

optional validateInput(value): undefined | null | string | InputBoxValidationMessage | Promise< undefined | null | string | InputBoxValidationMessage >

An optional function that will be called to validate input and to give a hint to the user.

Parameters

value: string

The current value of the input box.

Returns

undefined | null | string | InputBoxValidationMessage | Promise< undefined | null | string | InputBoxValidationMessage >

Either a human-readable string which is presented as an error message or an InputBoxValidationMessage which can provide a specific message severity. Return undefined, null, or the empty string when 'value' is valid.

Source

packages/extension-api/src/extension-api.d.ts:861