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

# rangeForUserCharacterAttributeChange

The range of characters affected by an action method that changes character (not paragraph) attributes.

```
var rangeForUserCharacterAttributeChange: NSRange { get }
```

## Discussion

The range of characters affected by an action method that changes character (not paragraph) attributes, such as the NSText action method [`changeFont(_:)`](/documentation/AppKit/NSText/changeFont(_:)). For rich text this range is typically the range of the selection. For plain text this range is the entire contents of the receiver. If the receiver isn’t editable or doesn’t use the Font panel, the range has a location of `NSNotFound`.

## See Also

[`usesFontPanel`](/documentation/AppKit/NSTextView/usesFontPanel)

A Boolean value that controls whether the text views sharing the receiver’s layout manager use the Font panel and Font menu.

[`editable`](/documentation/AppKit/NSTextView/isEditable)

A Boolean value that controls whether the text views sharing the receiver’s layout manager allow the user to edit text.



---

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)