<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextField/allowsEditingTextAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextField(py)allowsEditingTextAttributes"
  },
  "title" : "allowsEditingTextAttributes"
}
-->

# allowsEditingTextAttributes

A Boolean value that determines whether the user can edit the attributes of the text in the text field.

```
var allowsEditingTextAttributes: Bool { get set }
```

## Discussion

If this property is set to <doc://com.apple.documentation/documentation/Swift/true>, the user may edit the style information of the text. In addition, pasting styled text into the text field retains any embedded style information. If <doc://com.apple.documentation/documentation/Swift/false>, the text field prohibits the editing of style information and strips style information from any pasted text. However, you can still set the style information programmatically using the methods of this class.

The default value of this property is <doc://com.apple.documentation/documentation/Swift/false>.

---

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)