TX Text Control .NET Server

Javascript: MisspelledWord.getLength Method

Method|Introduced in 28.0

Description

Gets the length of a misspelled word.

Syntax

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

Parameters

ParameterDescription
callback

Receives the length of a misspelled word.

errorCallback

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

Examples

The following example demonstrates MisspelledWord.getLength in a practical document-editing workflow. It gets the length of a misspelled word.

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

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