TX Text Control .NET Server

Javascript: Footnote.getHighlightColor Method

Method|Introduced in 32.0

Description

Gets the highlight color for the reference mark and the footnote mark.

Syntax

<void> Footnote.getHighlightColor(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the requested property value.

errorCallback

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

Examples

The following example demonstrates Footnote.getHighlightColor in a practical document-editing workflow. It gets the highlight color for the reference mark and the footnote mark.

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

TXTextControl.footnotes.elementAt(0, function(footnote) {
    if (!footnote) {
        console.warn("No footnote is available.");
        return;
    }

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