Interface InstanceInputElement

Represents one of the input elements that web chat provides access to custom code.

interface InstanceInputElement {
    addChangeListener: (listener: ChangeFunction) => void;
    getHTMLElement: () => HTMLTextAreaElement;
    removeChangeListener: (listener: ChangeFunction) => void;
    setEnableEnterKey: (isEnabled: boolean) => void;
    setValue: (value: string) => void;
}

Properties

addChangeListener: (listener: ChangeFunction) => void

Adds a listener that will fire whenever the value in the input field is changed. This fires immediately like an "input" event and not only when focus is lost like a "change".

getHTMLElement: () => HTMLTextAreaElement

The raw HTML element for the element.

removeChangeListener: (listener: ChangeFunction) => void

Removes a change listener that was previously added.

setEnableEnterKey: (isEnabled: boolean) => void

Enables or disables the handling of the enter key by the input field.

setValue: (value: string) => void

Sets the current text value inside the input.

MMNEPVFCICPMFPCPTTAAATR