<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSIgnoreMisspelledWords",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSIgnoreMisspelledWords"
  },
  "title" : "NSIgnoreMisspelledWords"
}
-->

# NSIgnoreMisspelledWords

A protocol that enables the Ignore button in the Spelling panel to function properly.

```
protocol NSIgnoreMisspelledWords
```

## Overview

The Ignore button allows the user to accept a word that the spelling checker believes is misspelled. In order for this action to update the “ignored words” list for the document being checked, the [`NSIgnoreMisspelledWords`](/documentation/AppKit/NSIgnoreMisspelledWords) protocol must be implemented.

This protocol is necessary because a list of ignored words is useful only if it pertains to the entire document being checked, but the spelling checker (that is, an [`NSSpellChecker`](/documentation/AppKit/NSSpellChecker) object) does not check the entire document for spelling at once. The spelling checker returns as soon as it finds a misspelled word. Thus, it checks only a subset of the document at any one time. The user usually wants to check the entire document, so usually several spelling checks are run in succession until no misspelled words are found. This protocol allows the list of ignored words to be maintained per document, even though the spelling checks are not run per document.

The [`NSIgnoreMisspelledWords`](/documentation/AppKit/NSIgnoreMisspelledWords) protocol specifies a  method, [`ignoreSpelling(_:)`](/documentation/AppKit/NSIgnoreMisspelledWords/ignoreSpelling(_:)), which should be implemented like this:

```objc
- (void)ignoreSpelling:(id)sender {
    [[NSSpellChecker sharedSpellChecker] ignoreWord:[[sender selectedCell] stringValue]
                                        inSpellDocumentWithTag: myDocumentTag];
}
```

The second argument to the [`NSSpellChecker`](/documentation/AppKit/NSSpellChecker) method [`ignoreWord(_:inSpellDocumentWithTag:)`](/documentation/AppKit/NSSpellChecker/ignoreWord(_:inSpellDocumentWithTag:)) is a tag that the spell checker can use to distinguish the documents being checked. When the spell checker can distinguish the various documents, it can append new ignored words to the appropriate list.

To make the ignored words feature useful, the application must store a document’s ignored words list with the document. See the [`NSSpellChecker`](/documentation/AppKit/NSSpellChecker) class description for more information.

## Topics

### Ignoring spellings

[`ignoreSpelling(_:)`](/documentation/AppKit/NSIgnoreMisspelledWords/ignoreSpelling(_:))



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)