DS Server

Javascript: Footnote.edit Method

Method|Introduced in 32.0

Description

Sets the current text input position in the footnote section at the end of the current footnote text, so that the text can be edited or formatted.

Syntax

<void> Footnote.edit([<RequestBooleanCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates Footnote.edit in a practical document-editing workflow. It sets the current text input position in the footnote section at the end of the current footnote text, so that the text can be edited or formatted.

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.edit(
        function(result) {
            if (result) {
                console.log("edit is available.");
            } else {
                console.warn("edit is not available in the current document state.");
            }
        },
        onTxError
    );
}, onTxError);