<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "Xcode: 26.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/building-rich-swiftui-text-experiences",
  "metadataVersion" : "0.1.0",
  "role" : "sampleCode",
  "title" : "Building rich SwiftUI text experiences"
}
-->

# Building rich SwiftUI text experiences

Build an editor for formatted text using SwiftUI text editor views and attributed strings.

## Overview

> Note: This sample code project is associated with WWDC25 session 280: [Code-along: Cook up a rich text experience in SwiftUI with AttributedString](https://developer.apple.com/wwdc25/280/).

You can follow along with the code written in the WWDC25 session, learning how to upgrade `TextEditor` to rich text, build custom controls, and constrain the formatting options the editor provides.

After the code-along, you can learn more about how to persist rich text using SwiftData, and how to export rich text documents using the `Transferable` protocol.

### Configure the sample code project

To configure the sample code project, do the following in Xcode:

1. Open the sample with the latest version of Xcode.
2. Set the developer team to let Xcode automatically manage the provisioning profile. For more information, see [Set the bundle ID](doc://com.apple.documentation/documentation/Xcode/preparing-your-app-for-distribution) and [Assign the project to a team](doc://com.apple.documentation/documentation/Xcode/preparing-your-app-for-distribution).

---

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)