---
title: validAttributesForMarkedText()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nstextinputclient/validattributesformarkedtext()
---

# validAttributesForMarkedText()

Returns an array of attribute names recognized by the receiver.

## Declaration

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

## Return Value

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

## Discussion

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.

## See Also

### Handling marked text

- [hasMarkedText()](appkit/nstextinputclient/hasmarkedtext().md)
- [markedRange()](appkit/nstextinputclient/markedrange().md)
- [selectedRange()](appkit/nstextinputclient/selectedrange().md)
- [setMarkedText(_:selectedRange:replacementRange:)](appkit/nstextinputclient/setmarkedtext(_:selectedrange:replacementrange:).md)
- [unmarkText()](appkit/nstextinputclient/unmarktext().md)
