<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextStorageObserving",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextStorageObserving"
  },
  "title" : "NSTextStorageObserving"
}
-->

# NSTextStorageObserving

Optional methods that delegates implement to handle editing and transaction processing.

```
protocol NSTextStorageObserving : NSObjectProtocol
```

## Topics

### Accessing the text storage

[`var textStorage: NSTextStorage?`](/documentation/AppKit/NSTextStorageObserving/textStorage)

### Managing the editing process

[`func performEditingTransaction(for: NSTextStorage, using: () -> Void)`](/documentation/AppKit/NSTextStorageObserving/performEditingTransaction(for:using:))

[`func processEditing(for: NSTextStorage, edited: NSTextStorageEditActions, range: NSRange, changeInLength: Int, invalidatedRange: NSRange)`](/documentation/AppKit/NSTextStorageObserving/processEditing(for:edited:range:changeInLength:invalidatedRange:))

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Conforming Types

[`NSTextContentStorage`](/documentation/AppKit/NSTextContentStorage)

---

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)