DS Server

Javascript: Footnote.getReferenceMarkStart Method

Method|Introduced in 32.0

Description

Gets the index (one-based) of the first character of the footnote's reference mark.

Syntax

<void> Footnote.getReferenceMarkStart(<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.getReferenceMarkStart in a practical document-editing workflow. It gets the index (one-based) of the first character of the footnote's reference 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.getReferenceMarkStart(
        function(result) {
            console.log("get reference mark start result:", result);
        },
        onTxError
    );
}, onTxError);