<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpellChecker/OptionKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSTextCheckingOptionKey"
  },
  "title" : "NSSpellChecker.OptionKey"
}
-->

# NSSpellChecker.OptionKey

Constants that define options for text checking.

```
struct OptionKey
```

## Overview

The constants are optional keys that can be used in the options dictionary parameter of the [`check(_:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)`](/documentation/AppKit/NSSpellChecker/check(_:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)), [`requestChecking(of:range:types:options:inSpellDocumentWithTag:completionHandler:)`](/documentation/AppKit/NSSpellChecker/requestChecking(of:range:types:options:inSpellDocumentWithTag:completionHandler:)), and [`menu(for:string:options:atLocation:in:)`](/documentation/AppKit/NSSpellChecker/menu(for:string:options:atLocation:in:)) methods.

## Topics

### Spell Checker Options

[`static let documentAuthor: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/documentAuthor)

An NSString containing the name of an author to be associated with the document

[`static let documentTitle: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/documentTitle)

An NSString containing the title to be associated with the document.

[`static let documentURL: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/documentURL)

An NSURL to be associated with the document.

[`static let orthography: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/orthography)

An `NSOrthography` instance indicating an orthography to be used as a starting point for orthography checking, or as the orthography if orthography checking is not enabled.

[`static let quotes: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/quotes)

An `NSArray` containing four strings to be used with `quoteCheckingResult(range:replacementString:)` (opening double quote, closing double quote, opening single quote, and closing single quote in that order).

[`static let referenceDate: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/referenceDate)

An NSDate to be associated with the document, used as a referent for relative dates; if not specified, the current date will be used.

[`static let referenceTimeZone: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/referenceTimeZone)

An NSTimeZone to be associated with the document, used as a reference for dates without time zones; if not specified, the current time zone will be used.

[`static let regularExpressions: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/regularExpressions)

[`static let replacements: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/replacements)

An NSDictionary containing replacements to be used with NSTextCheckingTypeReplacement; if not specified, values will be taken from user’s preferences.

[`static let selectedRange: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/selectedRange)

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSSpellChecker/OptionKey/init(rawValue:))

### Getting additional option values

[`static let generateInlinePredictionsKey: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/generateInlinePredictionsKey)

[`static let automaticCapitalizationEnabledKey: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/automaticCapitalizationEnabledKey)

[`static let waitForAllGrammarCheckingResultsKey: NSSpellChecker.OptionKey`](/documentation/AppKit/NSSpellChecker/OptionKey/waitForAllGrammarCheckingResultsKey)

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)