TX Text Control .NET Server

Javascript: TextField.getHighlightMode Method

Method|Introduced in 28.0

Description

Gets a value indicating when the text field is highlighted.

Syntax

<void> TextField.getHighlightMode(<RequestHighlightModeCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the condition for highlighting.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates TextField.getHighlightMode in a practical document-editing workflow. It gets a value indicating when the text field is highlighted.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectHighlightMode(textField) {
    textField.getHighlightMode(
        function(result) {
            if (!result) {
                console.warn("No highlight mode was returned.");
                return;
            }
            
            console.log("get highlight mode result:", result);
        },
        onTxError
    );
}