# MisspelledWordCollection Object

> The MisspelledWordCollection contains all misspelled words in the main part of a Text Control document.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > MisspelledWordCollection Object
- **884 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/llms-full.txt

---

### Description

The MisspelledWordCollection contains all misspelled words in the main part of a Text Control document.

### Syntax

```javascript
MisspelledWordCollection
```

### Examples

The following example demonstrates `MisspelledWordCollection` in a practical document-editing workflow. The MisspelledWordCollection contains all misspelled words in the main part of a Text Control document.

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

function inspectMisspelledWordCollection(misspelledWords) {
    misspelledWords.getCountOf(
        TXTextControl.MisspelledWordKind.All,
        function(result) {
            console.log("get count of result:", result);
        },
        onTxError
    );
}
```

---

## In This Section

- [Javascript: MisspelledWordCollection.getCountOf Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getcountof-method/llms-full.txt): Gets the number of misspelled words with a special meaning from the collection.
- [Javascript: MisspelledWordCollection.getItemAtInputPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getitematinputposition-method/llms-full.txt): Gets the misspelled word of the specified kind at the current text input position. If there is no misspelled word, the next possible word of is returned. If there is no misspelled word of the specified kind between the current input position and the end of the text, the first word of the specified kind is returned.
- [Javascript: MisspelledWordCollection.getItemAtLocation Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getitematlocation-method/llms-full.txt): Gets the misspelled word at a certain geometrical location. If there is no misspelled word, null is returned.
- [Javascript: MisspelledWordCollection.getItemAtTextPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getitemattextposition-method/llms-full.txt): Gets the misspelled word of the specified kind at the specified text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word of the specified kind between the specified input position and the end of the text, the first word of the specified kind is returned.
- [Javascript: MisspelledWordCollection.ignore Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/ignore-method/llms-full.txt): Changes the text of the specified misspelled word and marks it as ignored. Ignored misspelled words are not underlined with a red zigzag line.
- [Javascript: MisspelledWordCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/remove-method/llms-full.txt): Removes the specified misspelled word from a Text Control document. The method removes the word's reference in the list of misspelled words and replaces the word's text with the specified text.

---

## Nearby

- **Previous:** [Javascript: MisspelledWord.setIsIgnored Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledword/setisignored-method/llms-full.txt)
- **Next:** [Javascript: MisspelledWordCollection.getCountOf Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getcountof-method/llms-full.txt)
