TX Text Control .NET Server

Javascript: EditableRegion.getLength Method

Method|Introduced in 28.0

Description

Gets the number of characters which belong to the editable region.

Syntax

<void> EditableRegion.getLength(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the number of characters which belong to the editable region.

errorCallback

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

Examples

The following example demonstrates EditableRegion.getLength in a practical document-editing workflow. It gets the number of characters which belong to the editable region.

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

function inspectLength(editableRegion) {
    editableRegion.getLength(
        function(result) {
            console.log("get length result:", result);
        },
        onTxError
    );
}