---
title: NSSpellingStateAttributeName
framework: appkit
role: symbol
role_heading: Global Variable
path: appkit/nsspellingstateattributename
---

# NSSpellingStateAttributeName

The spelling state of the text.

## Declaration

```occ
extern NSAttributedStringKey NSSpellingStateAttributeName;
```

## Discussion

Discussion The value of this attribute is an integer. The default value of this key is 0, which indicates that there are no grammar or spelling errors. Specify a different value to indicate that a spelling or grammar error exists. This key is available in macOS 10.2 and later, but its interpretation changed in OS X v10.5. Previously, any non-zero value caused the spelling indicator to be displayed. For macOS 10.5 and later, the (integer) value is treated as being composed of the spelling and grammar flags. See NSSpellingStateAttributeName Flags for possible values.

## See Also

### Getting text attribute keys

- [NSCursorAttributeName](appkit/nscursorattributename.md)
- [NSLinkAttributeName](appkit/nslinkattributename.md)
- [NSMarkedClauseSegmentAttributeName](appkit/nsmarkedclausesegmentattributename.md)
- [NSShadowAttributeName](appkit/nsshadowattributename.md)
- [NSTextAlternativesAttributeName](appkit/nstextalternativesattributename.md)
- [NSTextEffectAttributeName](appkit/nstexteffectattributename.md)
- [NSTextHighlightColorSchemeAttributeName](appkit/nstexthighlightcolorschemeattributename.md)
- [NSTextHighlightStyleAttributeName](appkit/nstexthighlightstyleattributename.md)
- [NSToolTipAttributeName](appkit/nstooltipattributename.md)
