<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextContentManager/recordEditAction(in:newTextRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextContentManager(im)recordEditActionInRange:newTextRange:"
  },
  "title" : "recordEditAction(in:newTextRange:)"
}
-->

# recordEditAction(in:newTextRange:)

Records information about an edit action to the transaction.

```
func recordEditAction(in originalTextRange: NSTextRange, newTextRange: NSTextRange)
```

## Parameters

`originalTextRange`

The range before the action.

`newTextRange`

The corresponding range after the action.

## Discussion

The concrete subclass invokes this method for each edit action.

---

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)