---
title: NSWritingToolsCoordinator
framework: appkit
role: symbol
role_heading: Class
path: appkit/nswritingtoolscoordinator
---

# NSWritingToolsCoordinator

An object that manages interactions between Writing Tools and your custom text view.

## Declaration

```swift
@MainActor class NSWritingToolsCoordinator
```

## Mentioned in

Adding Writing Tools support to a custom AppKit view

## Overview

Overview Add a NSWritingToolsCoordinator object to a custom view when you want to add Writing Tools support to that view. The coordinator manages interactions between your view and the Writing Tools UI and back-end capabilities. When creating a coordinator, you supply a delegate object to respond to requests from the system and provide needed information. Your delegate delivers your view’s text to Writing Tools, incorporates suggested changes back into your text storage, and supports the animations that Writing Tools creates to show the state of an operation. Create the NSWritingToolsCoordinator object when setting up your UI, and initialize it with a custom object that adopts the NSWritingToolsCoordinator.Delegate protocol. Add the coordinator to the writingToolsCoordinator property of your view. When a coordinator is present on a view, the system adds UI elements to initiate Writing Tools operations. When defining the delegate, choose an object from your app that has access to your view and its text storage. You can adopt the NSWritingToolsCoordinator.Delegate protocol in the view itself, or in another type that your view uses to manage content. During the interactions with Writing Tools, the delegate gets and sets the contents of the view’s text storage and supports Writing Tools behaviors. note: You don’t need to create an NSWritingToolsCoordinator  object if you display text using a UITextView, NSTextField, NSTextView, TextField, or TextEditor view. Those views already include the required support to handle Writing Tools interactions.

## Topics

### Creating a coordinator object

- [init(delegate:)](appkit/nswritingtoolscoordinator/init(delegate:).md)

### Checking the availability of Writing Tools

- [isWritingToolsAvailable](appkit/nswritingtoolscoordinator/iswritingtoolsavailable.md)

### Managing Writing Tools interactions

- [delegate](appkit/nswritingtoolscoordinator/delegate-swift.property.md)
- [NSWritingToolsCoordinator.Delegate](appkit/nswritingtoolscoordinator/delegate-swift.protocol.md)
- [view](appkit/nswritingtoolscoordinator/view.md)

### Getting the host views for effects

- [effectContainerView](appkit/nswritingtoolscoordinator/effectcontainerview.md)
- [decorationContainerView](appkit/nswritingtoolscoordinator/decorationcontainerview.md)

### Configuring the experience

- [preferredBehavior](appkit/nswritingtoolscoordinator/preferredbehavior.md)
- [behavior](appkit/nswritingtoolscoordinator/behavior.md)
- [preferredResultOptions](appkit/nswritingtoolscoordinator/preferredresultoptions.md)
- [resultOptions](appkit/nswritingtoolscoordinator/resultoptions.md)

### Reporting changes to Writing Tools

- [updateRange(_:with:reason:forContextWithIdentifier:)](appkit/nswritingtoolscoordinator/updaterange(_:with:reason:forcontextwithidentifier:).md)
- [updateForReflowedTextInContextWithIdentifier(_:)](appkit/nswritingtoolscoordinator/updateforreflowedtextincontextwithidentifier(_:).md)
- [NSWritingToolsCoordinator.TextUpdateReason](appkit/nswritingtoolscoordinator/textupdatereason.md)

### Managing the current state

- [stopWritingTools()](appkit/nswritingtoolscoordinator/stopwritingtools().md)
- [state](appkit/nswritingtoolscoordinator/state-swift.property.md)
- [NSWritingToolsCoordinator.State](appkit/nswritingtoolscoordinator/state-swift.enum.md)

### Getting the supporting types

- [NSWritingToolsCoordinator.ContextScope](appkit/nswritingtoolscoordinator/contextscope.md)
- [NSWritingToolsCoordinator.TextReplacementReason](appkit/nswritingtoolscoordinator/textreplacementreason.md)
- [NSWritingToolsCoordinator.TextAnimation](appkit/nswritingtoolscoordinator/textanimation.md)

### Instance Properties

- [includesTextListMarkers](appkit/nswritingtoolscoordinator/includestextlistmarkers.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Writing Tools for custom views

- [Supporting Writing Tools via the pasteboard](appkit/supporting-writing-tools-via-the-pasteboard.md)
- [Adding Writing Tools support to a custom AppKit view](appkit/adding-writing-tools-support-to-a-custom-nsview.md)
- [NSWritingToolsCoordinator.Delegate](appkit/nswritingtoolscoordinator/delegate-swift.protocol.md)
- [NSWritingToolsCoordinator.Context](appkit/nswritingtoolscoordinator/context.md)
- [NSWritingToolsCoordinator.AnimationParameters](appkit/nswritingtoolscoordinator/animationparameters.md)
- [Enhancing your custom text engine with Writing Tools](appkit/enhancing-your-custom-text-engine-with-writing-tools.md)
