MisspelledWord Object
Description
The MisspelledWord object represents a misspelled word in a document's text.
Syntax
MisspelledWordExamples
The following example demonstrates MisspelledWord in a practical document-editing workflow. The MisspelledWord object represents a misspelled word in a document's text.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectMisspelledWord(misspelledWord) {
misspelledWord.getText(
function(result) {
console.log("get text result:", result);
},
onTxError
);
}Members
Methods
| Method | Description |
|---|---|
| getIsDuplicate | Gets a value which marks the misspelled word as duplicate. |
| getIsIgnored | Gets 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 |
| getLength | Gets the length of a misspelled word. |
| getNumber | Gets the number of this misspelled word. All misspelled words are counted from the beginning to the end of a document. The first word has the number 1. |
| getStart | Gets the starting position of a misspelled word. It is a one-based index of the word's first character. |
| getText | Gets the text of the misspelled word. |
| select | Selects the misspelled word in the text. |
| setIsDuplicate | 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. |
| setIsIgnored | 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. |