what's new with the TextEditor
Asked on 06/11/2025
1 search
The new features for the TextEditor
in SwiftUI, as presented at WWDC, include support for rich text editing using AttributedString
. This allows for a wide range of text styling options such as boldness, italics, underline, strikethrough, custom fonts, point size, foreground and background colors, kerning, tracking, baseline offset, and more. The TextEditor
can now handle dark mode and dynamic type, and it supports paragraph styling, line height, text alignment, and base writing direction as independent attributes.
Additionally, you can customize the text editor by using the Attributed Text Formatting Definition Protocol to define which attributes are available and what values they might have. This allows for a more tailored text editing experience, where you can constrain attributes and apply custom formatting rules.
For more detailed information, you can refer to the session Code-along: Cook up a rich text experience in SwiftUI with AttributedString (00:01:15).

Code-along: Cook up a rich text experience in SwiftUI with AttributedString
Learn how to build a rich text experience with SwiftUI’s TextEditor API and AttributedString. Discover how you can enable rich text editing, build custom controls that manipulate the contents of your editor, and customize the formatting options available. Explore advanced capabilities of AttributedString that help you craft the best text editing experiences.

What’s new in SwiftUI
Learn what’s new in SwiftUI to build great apps for any Apple platform. We’ll explore how to give your app a brand new look and feel with Liquid Glass. Discover how to boost performance with framework enhancements and new instruments, and integrate advanced capabilities like web content and rich text editing. We’ll also show you how SwiftUI is expanding to more places, including laying out views in three dimensions.

What’s new in UIKit
Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.