DS Server

Javascript: TextViewGeneratorColors.getFormFieldColor Method

Method|Introduced in 28.0

Description

Gets the default highlight color of form fields. If the property is not set, the return value is null.

Syntax

<void> TextViewGeneratorColors.getFormFieldColor(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the highlight color.

errorCallback

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

Examples

The following example demonstrates TextViewGeneratorColors.getFormFieldColor in a practical document-editing workflow. It gets the default highlight color of form fields. If the property is not set, the return value is null.

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

TXTextControl.displayColors.getFormFieldColor(
    function(result) {
        console.log("get form field color result:", result);
    },
    onTxError
);