<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWritingToolsCoordinator/TextDecoration",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSWritingToolsCoordinatorTextDecoration"
  },
  "title" : "NSWritingToolsCoordinator.TextDecoration"
}
-->

# NSWritingToolsCoordinator.TextDecoration

Use the `NSWritingToolsCoordinator.TextDecoration` constants to determine
the type of decoration to be applied to a preview for grammar animation.
The grammar animation needs previews of the text of the issue in two forms,
without and with the grammar indication underline applied. If you use
grammar animation, you must implement the delegate method
[`writingToolsCoordinator(_:requestsPreviewFor:of:in:textDecoration:completion:)`](/documentation/AppKit/NSWritingToolsCoordinator/Delegate-swift.protocol/writingToolsCoordinator(_:requestsPreviewFor:of:in:textDecoration:completion:))
to provide both forms of previews, based on the specified decoration.

```
enum TextDecoration
```

## Topics

### Enumeration Cases

[`case grammarUnderline`](/documentation/AppKit/NSWritingToolsCoordinator/TextDecoration/grammarUnderline)

Requests a preview of the text with the grammar indication underline.

[`case none`](/documentation/AppKit/NSWritingToolsCoordinator/TextDecoration/none)

Requests a preview of the text without any additional decoration.

### Initializers

[`init?(rawValue: Int)`](/documentation/AppKit/NSWritingToolsCoordinator/TextDecoration/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)