Skip to main content

Interface: InputBoxOptions

Defined in: packages/extension-api/src/extension-api.d.ts:1439

Options to configure the behavior of the input box UI.

Properties

ignoreFocusOut?

optional ignoreFocusOut: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:1482

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.


markdownDescription?

optional markdownDescription: string

Defined in: packages/extension-api/src/extension-api.d.ts:1466

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


multiline?

optional multiline: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:1487

Set to true when value represents a multi line content.


password?

optional password: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:1476

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


placeHolder?

optional placeHolder: string

Defined in: packages/extension-api/src/extension-api.d.ts:1471

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


prompt?

optional prompt: string

Defined in: packages/extension-api/src/extension-api.d.ts:1461

The text to display underneath the input box.


title?

optional title: string

Defined in: packages/extension-api/src/extension-api.d.ts:1443

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


value?

optional value: string

Defined in: packages/extension-api/src/extension-api.d.ts:1448

The value to pre-fill in the input box.


valueSelection?

optional valueSelection: [number, number]

Defined in: packages/extension-api/src/extension-api.d.ts:1456

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.

Methods

validateInput()?

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

Defined in: packages/extension-api/src/extension-api.d.ts:1497

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

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

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.