---
title: validAttributesForMarkedText
framework: AppKit
role: symbol
role_heading: Instance Method
platforms: [macOS 10.0+]
path: appkit/nstextinput/validattributesformarkedtext
---

# validAttributesForMarkedText

Returns an array of names for the attributes supported by the receiver.

## Declaration

```occ
- (NSArray *) validAttributesForMarkedText;
```

## Return Value

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

## Discussion

Discussion The input server may choose to use some of these attributes in the text it inserts or in marked text. Returns an empty array if no attributes are supported. See NSAttributedString Additions for the set of string constants that you could return in the array.

## See Also

### Deprecated methods

- [hasMarkedText](appkit/nstextinput/hasmarkedtext.md)
- [markedRange](appkit/nstextinput/markedrange.md)
- [selectedRange](appkit/nstextinput/selectedrange.md)
- [setMarkedText:selectedRange:](appkit/nstextinput/setmarkedtext:selectedrange:.md)
- [unmarkText](appkit/nstextinput/unmarktext.md)
- [attributedSubstringFromRange:](appkit/nstextinput/attributedsubstringfromrange:.md)
- [insertText:](appkit/nstextinput/inserttext:.md)
- [characterIndexForPoint:](appkit/nstextinput/characterindexforpoint:.md)
- [firstRectForCharacterRange:](appkit/nstextinput/firstrectforcharacterrange:.md)
- [doCommandBySelector:](appkit/nstextinput/docommandbyselector:.md)
- [conversationIdentifier](appkit/nstextinput/conversationidentifier.md)
