TX Text Control .NET Server

Javascript: Footnote.getReferenceMarkLength Method

Method|Introduced in 32.0

Description

Gets the number of characters the reference mark consists of.

Syntax

<void> Footnote.getReferenceMarkLength(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the property value.

errorCallback

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

Examples

The following example demonstrates Footnote.getReferenceMarkLength in a practical document-editing workflow. It gets the number of characters the reference mark consists of.

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.getReferenceMarkLength(
        function(result) {
            console.log("get reference mark length result:", result);
        },
        onTxError
    );
}, onTxError);