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

# NSEditorRegistration

A set of methods that controllers can implement to enable an editor view to inform the controller when it has uncommitted changes.

```
protocol NSEditorRegistration : NSObjectProtocol
```

## Overview

An implementor is responsible for tracking which editors have uncommitted changes, and sending those editors <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/commitEditing> and <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/discardEditing> messages, as appropriate, to force the editor to submit, or discard, their values.

[`NSController`](/documentation/AppKit/NSController) provides an implementation of this informal protocol. You would implement this protocol if you wanted to provide your own controller class without subclassing [`NSController`](/documentation/AppKit/NSController).

## Topics

### Instance Methods

[`func objectDidBeginEditing(any NSEditor)`](/documentation/AppKit/NSEditorRegistration/objectDidBeginEditing(_:))

[`func objectDidEndEditing(any NSEditor)`](/documentation/AppKit/NSEditorRegistration/objectDidEndEditing(_:))

## Relationships

### Conforming Types

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)