TX Text Control .NET Server

Javascript: MisspelledWord.setIsDuplicate Method

Method|Introduced in 28.0

Description

Sets a value which marks the misspelled word as duplicate. A duplicate word is not misspelled, but it has the same text as the word in front of it.

Syntax

<void> MisspelledWord.setIsDuplicate(<Boolean> isDuplicate, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
isDuplicate

Indicates whether the word is marked as duplicate.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates MisspelledWord.setIsDuplicate in a practical document-editing workflow. It sets a value which marks the misspelled word as duplicate. A duplicate word is not misspelled, but it has the same text as the word in front of it.

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

function configureIsDuplicate(misspelledWord) {
    misspelledWord.setIsDuplicate(
        true,
        function() {
            console.log("set is duplicate completed.");
        },
        onTxError
    );
}