Javascript: TextField.setIsSpellCheckingEnabled Method
Description
Gets whether a text field's text is checked on misspelled words.
Syntax
<void> TextField.setIsSpellCheckingEnabled(<boolean> isSpellCheckingEnabled, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| isSpellCheckingEnabled | Specifies whether a text field's text is checked on misspelled words. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TextField.setIsSpellCheckingEnabled 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 configureIsSpellCheckingEnabled(textField) {
textField.setIsSpellCheckingEnabled(
true,
function() {
console.log("set is spell checking enabled completed.");
},
onTxError
);
}