text-editing

Implement styled text display and rich text editing in SwiftUI with AttributedString.

603|51|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill text-editing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: text-editing
Source: https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/text-editing
Command: npx skills add https://github.com/rshankras/claude-code-apple-skills --skill text-editing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the creation and management of styled text display and rich text editing within SwiftUI applications, enabling dynamic and interactive text experiences.

Core Features & Use Cases

  • Styled Text Display: Render text with various fonts, weights, colors, and decorations.
  • Rich Text Editing: Implement TextEditor with support for AttributedString and selection-based formatting.
  • Formatting Controls: Build toolbars for applying bold, italic, and underline styles.
  • Use Case: Develop a note-taking app where users can format their text with different styles and apply them to selected portions of their content.

Quick Start

Use the text-editing skill to create a SwiftUI view that allows users to edit rich text with bold, italic, and underline formatting options.

Frequently Asked Questions about text-editing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement rich text editing in SwiftUI with formatting controls?

Rich text editing in SwiftUI is implemented using `TextEditor` with `AttributedString` to support dynamic styling, selection-based attribute modification, and custom formatting constraints for interactive text manipulation.

Can I apply bold, italic, and underline styles to selected text in a SwiftUI TextEditor?

Yes, you can apply bold, italic, and underline styles to selected text in a SwiftUI `TextEditor` by using selection-based attribute modification on an `AttributedString` to update specific portions of the content.

What's the best way to display styled text with custom fonts and colors in SwiftUI?

The best way to display styled text in SwiftUI is using the `Text` view with `AttributedString`, allowing you to render dynamic fonts, weights, colors, and decorations for rich text display.

Does SwiftUI support dynamic styling and custom formatting constraints for attributed text?

Yes, SwiftUI supports dynamic styling and custom formatting constraints for attributed text by modifying `AttributedString` attributes dynamically during `TextEditor` sessions to enable advanced text manipulation.

Why use AttributedString for text editing in SwiftUI instead of standard String?

Using `AttributedString` for text editing in SwiftUI enables rich text display and selection-based formatting, allowing dynamic attribute modifications like fonts and colors that a standard `String` cannot inherently manage.