<!--
{
  "availability" : [
    "macOS: 15.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWritingToolsCoordinator/decorationContainerView",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWritingToolsCoordinator(py)decorationContainerView"
  },
  "title" : "decorationContainerView"
}
-->

# decorationContainerView

The view that Writing Tools uses to display background decorations
such as proofreading marks.

```
weak var decorationContainerView: NSView? { get set }
```

## Discussion

Writing Tools uses the view in this property to host proofreading marks
and other visual elements that show any suggested changes. Set this
property to a subview situated visibly below the text in your custom
text view. It’s also satisfactory to place this view visually in front
of the text. Make sure the size of the view is big enough to
cover all of the affected text. If you don’t assign a value to this
property, the coordinator places its own decoration view behind the subviews
in your custom view. The default value of this property is `nil`.

If you display your view’s text using multiple text containers, implement the
[`writingToolsCoordinator(_:requestsSingleContainerSubrangesOf:in:completion:)`](/documentation/AppKit/NSWritingToolsCoordinator/Delegate-swift.protocol/writingToolsCoordinator(_:requestsSingleContainerSubrangesOf:in:completion:))
and [`writingToolsCoordinator(_:requestsDecorationContainerViewFor:in:completion:)`](/documentation/AppKit/NSWritingToolsCoordinator/Delegate-swift.protocol/writingToolsCoordinator(_:requestsDecorationContainerViewFor:in:completion:))
methods to provide separate decoration views for each container.

---

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)