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

# validAttributesForMarkedText()

Returns an array of attribute names recognized by the receiver.

```
func validAttributesForMarkedText() -> [NSAttributedString.Key]
```

## Return Value

An array of `NSString` objects representing names for the supported attributes.

## Discussion

Returns an empty array if no attributes are supported. See NSAttributedString Application Kit Additions Reference for the set of string constants representing standard attributes.

---

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)