DS Server

Javascript: TextField.getHighlightColor Method

Method|Introduced in 28.0

Description

Gets the highlight color for the text field.

Syntax

<void> TextField.getHighlightColor(<RequestColorStringCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the highlight color for the text field.

errorCallback

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

Examples

The following example demonstrates TextField.getHighlightColor in a practical document-editing workflow. It gets the highlight color for the text field.

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

function inspectHighlightColor(textField) {
    textField.getHighlightColor(
        function(color) {
            console.log("get highlight color result:", color);
        },
        onTxError
    );
}