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

# currentEditor()

Returns the current field editor for the control.

```
func currentEditor() -> NSText?
```

## Return Value

The field editor for the current control, or `nil` if the receiver does not have a field editor.

## Discussion

When the receiver is a control displaying editable text (for example, a text field) and it is the first responder, it has a field editor, which is returned by this method. The field editor is a single [`NSTextView`](/documentation/AppKit/NSTextView) object that is shared among all the controls in a window for light text-editing needs. It is automatically instantiated when needed.

---

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)