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

# NSTextContentManagerDelegate

The optional methods that delegates of content manager objects implement for customizing or validating text elements.

```
protocol NSTextContentManagerDelegate : NSObjectProtocol
```

## Topics

### Finding a text element at a specific location

[`func textContentManager(NSTextContentManager, textElementAt: any NSTextLocation) -> NSTextElement?`](/documentation/AppKit/NSTextContentManagerDelegate/textContentManager(_:textElementAt:))

The method the framework calls to return the text element at a specific location.

### Validating a text element

[`func textContentManager(NSTextContentManager, shouldEnumerate: NSTextElement, options: NSTextContentManager.EnumerationOptions) -> Bool`](/documentation/AppKit/NSTextContentManagerDelegate/textContentManager(_:shouldEnumerate:options:))

Returns a Boolean value that indicates whether the framework should skip this text element in the enumeration.

## Relationships

### Inherited By

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

### 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)