Javascript: MisspelledWord.setIsIgnored Method
Description
Sets a value which marks the misspelled word as ignored. An ignored misspelled word remains in the collection of misspelled words, but it is not underlined in the text with a red zigzag line.
Syntax
<void> MisspelledWord.setIsIgnored(<Boolean> isIgnored, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| isIgnored | A value which marks the misspelled word as ignored. |
| 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.setIsIgnored in a practical document-editing workflow. It sets a value which marks the misspelled word as ignored. An ignored misspelled word remains in the collection of misspelled words, but it is not underlined in the text with a red zigzag line.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureIsIgnored(misspelledWord) {
misspelledWord.setIsIgnored(
true,
function() {
console.log("set is ignored completed.");
},
onTxError
);
}