DS Server

Javascript: TextField.getIsSpellCheckingEnabled Method

Method|Introduced in 28.0

Description

Gets whether a text field's text is checked on misspelled words.

Syntax

<void> TextField.getIsSpellCheckingEnabled(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives whether a text field's text is checked on misspelled words.

errorCallback

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

Examples

The following example demonstrates TextField.getIsSpellCheckingEnabled in a practical document-editing workflow. It gets whether a text field's text is checked on misspelled words.

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

function inspectIsSpellCheckingEnabled(textField) {
    textField.getIsSpellCheckingEnabled(
        function(result) {
            if (result) {
                console.log("get is spell checking enabled is available.");
            } else {
                console.warn("get is spell checking enabled is not available in the current document state.");
            }
        },
        onTxError
    );
}