TX Text Control .NET Server

Footnote Object

Object|Introduced in 32.0

Description

A Footnote object represents a footnote in a TextControl document. A footnote can be inserted trough the FootnoteCollection.add method. It consists of a reference mark in the document and the footnote itself appearing at the bottom of the page. The footnote has a footnote mark with the same number as the reference mark. All Footnote objects are contained in the FootnoteCollection, which can be obtained with the TXTextControl.footnotes property.

Syntax

Footnote

Examples

The following example demonstrates Footnote in a practical document-editing workflow. A Footnote object represents a footnote in a TextControl document. A footnote can be inserted trough the FootnoteCollection.add method. It consists of a reference mark in the document and the footnote itself appearing at the bottom of the page. The footnote has a footnote mark with the same number as the reference mark. All Footnote objects are contained in the FootnoteCollection, which can be obtained with the TXTextControl.footnotes property.

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.getID(
        function(result) {
            console.log("get id result:", result);
        },
        onTxError
    );
}, onTxError);

Members

Methods

MethodDescription
editSets 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.
getHighlightColorGets the highlight color for the reference mark and the footnote mark.
getHighlightModeGets a value indicating whether the reference mark and the footnote mark is highlighted.
getIDGets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.
getNameGets the footnote's name. An empty string indicates that the footnote has no name.
getNumberGets the footnote's number in the text. The first footnote in the document has the number 1. The number is defined through the textflow.
getReferenceMarkLengthGets the number of characters the reference mark consists of.
getReferenceMarkStartGets the index (one-based) of the first character of the footnote's reference mark.
scrollToScrolls the beginning of the footnote mark into the visible part of the document using a default position depending on the previous position.
scrollToPositionScrolls the beginning of the footnote mark into the visible part of the document using the specified position.
setHighlightColorSets the highlight color for the reference mark and the footnote mark.
setHighlightModeSets a value indicating whether the reference mark and the footnote mark is highlighted.
setIDSets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.
setNameSets a name for the footnote. An empty string indicates that the footnote has no name.