DS Server

TextFieldCollectionBase Object

Object|Introduced in 28.0

Description

Contains all standard text fields in a Text Control document or part of the document.

Syntax

TextFieldCollectionBase

Examples

The following example demonstrates TextFieldCollectionBase in a practical document-editing workflow. It contains all standard text fields in a Text Control document or part of the document.

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

function inspectTextFieldCollectionBase(textFieldCollectionBase) {
    textFieldCollectionBase.getCanAdd(
        function(result) {
            if (result) {
                console.log("get can add is available.");
            } else {
                console.warn("get can add is not available in the current document state.");
            }
        },
        onTxError
    );
}

Members

Methods

MethodDescription
elementAtReturns the element at a specified index in the collection. (Inherited from Collection.)
forEachExecutes a callback function for each element. (Inherited from Collection.)
getCanAddGets a value indicating whether a new text field can be inserted at the current input position.
getCountGets the number of elements contained in the collection. (Inherited from Collection.)