---
title: NSWritingToolsCoordinator.TextDecoration
framework: AppKit
role: symbol
role_heading: Enumeration
platforms: [macOS 27.0+]
path: appkit/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:) to provide both forms of previews, based on the specified decoration.

## Declaration

```swift
enum TextDecoration
```

## Topics

### Enumeration Cases

- [NSWritingToolsCoordinator.TextDecoration.grammarUnderline](appkit/nswritingtoolscoordinator/textdecoration/grammarunderline.md)
- [NSWritingToolsCoordinator.TextDecoration.none](appkit/nswritingtoolscoordinator/textdecoration/none.md)

### Initializers

- [init(rawValue:)](appkit/nswritingtoolscoordinator/textdecoration/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
