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

# attributedString

The portion of your view’s text to evaluate.

```
@NSCopying var attributedString: NSAttributedString { get }
```

## Discussion

The [`NSWritingToolsCoordinator.Context`](/documentation/AppKit/NSWritingToolsCoordinator/Context) object initializes the value of this
property at creation time and doesn’t change it during the course of an operation.
Instead, it suggests changes to the text in the indicated range and reports
those changes to your [`NSWritingToolsCoordinator.Delegate`](/documentation/AppKit/NSWritingToolsCoordinator/Delegate-swift.protocol) object. Use the methods
of your delegate object to integrate those changes back into your view’s text storage.

It’s your responsibility to track the location of this text in your
view’s text storage object. When Writing Tools reports changes,
it provides range values relative to this string. If you initialize
this property with a subset of your view’s content, you must adjust
any ranges that Writing Tools provides to get the correct location
in your text storage.

---

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)