<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/nseditor-deprecated-symbols",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "NSEditor"
}
-->

# NSEditor

A set of methods that controllers and UI elements can implement to manage editing.

## Discussion

The [`NSEditor`](/documentation/AppKit/NSEditor) informal protocol provides a means for requesting that the receiver commit or discard any pending edits.

These methods are typically invoked on user interface elements by a controller. They can also be sent to a controller in response to a user’s attempt to save a document or quit an application.

[`NSController`](/documentation/AppKit/NSController) provides an implementation of this protocol, as do the AppKit user interface elements that support binding.

> Important:
> In macOS 10.7 or later, if you have enabled autosaving in your application, and your application has custom objects that implement or override the ``doc://com.apple.appkit/documentation/AppKit/NSEditor`` protocol, you must also implement ``doc://com.apple.appkit/documentation/AppKit/NSEditor/commitEditingWithoutPresentingError()`` in those objects.

## Topics

### Managing editing

  <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/discardEditing>

  <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/commitEditing>

  <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/commitEditingAndReturnError:>

  <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/commitEditingWithDelegate:didCommitSelector:contextInfo:>



---

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)