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

# NSTextStorageDelegate

The optional methods that delegates of text storage objects implement to handle text-edit processing.

```
protocol NSTextStorageDelegate : NSObjectProtocol
```

## Topics

### Processing edit actions

[`textStorage(_:willProcessEditing:range:changeInLength:)`](/documentation/AppKit/NSTextStorageDelegate/textStorage(_:willProcessEditing:range:changeInLength:))

The method the framework calls when a text storage object is about to process edits.

[`textStorage(_:didProcessEditing:range:changeInLength:)`](/documentation/AppKit/NSTextStorageDelegate/textStorage(_:didProcessEditing:range:changeInLength:))

The method the framework calls when a text storage object has finished processing edits.



---

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)