Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers SwiftUI styled text display and rich text editing with AttributedString, TextEditor, and formatting controls.
71% 100%+29 ptsof test cases passed
Passed 24 of 24 test cases with the skill, and 17 of 24 without it.
3 of 3 safety checks passed
Not used yet
Patterns for displaying styled text and building rich text editors in SwiftUI. Covers Text styling, AttributedString, TextEditor with selection-based formatting, and custom formatting definitions.
Use this skill when the user:
What text feature do you need?
|
+- Display styled read-only text
| +- Simple styling (one style) -> Text Styling section below
| +- Mixed styles in one string -> AttributedString section below
| +- Markdown content -> Markdown section below
|
+- Edit plain text
| +- TextEditor(text: $stringBinding)
|
+- Edit rich/styled text
| +- Basic rich editor -> Rich Text Editing section below
| +- With formatting toolbar -> Formatting Controls section below
| +- With custom constraints -> Custom Formatting section below
| API | Minimum Version | Notes |
|---|---|---|
Text with modifiers | iOS 13 | .font(), .bold(), .italic() |
TextEditor(text:) | iOS 14 | Plain string binding |
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.