text-editing

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

27|5|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/bocan/bocan-music --skill text-editing-bocan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: text-editing
Source: https://github.com/bocan/bocan-music/tree/main/.claude/skills/swiftui/text-editing
Command: npx skills add https://github.com/bocan/bocan-music --skill text-editing-bocan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implementing styled text display and rich text editing in SwiftUI is challenging due to varying API availability across iOS versions, inconsistent formatting controls, and limited native Markdown support. This Skill eliminates these friction points by providing clear, version-aware patterns and best practices for all common text use cases.

Core Features & Use Cases

  • Modern Text Styling: Use up-to-date SwiftUI APIs like .foregroundStyle() and conditional bold/italic modifiers instead of deprecated options.
  • Rich Text Editing: Build fully functional rich text editors with AttributedString, selection-based formatting, and custom formatting constraints for iOS 18 and later.
  • Inline Markdown Support: Render basic styled Markdown content directly in SwiftUI Text views without external dependencies.
  • Use Case: A note-taking app can use this Skill to implement a rich text editor with a formatting toolbar that lets users apply bold, italic, and underline styles to selected text, while also displaying styled note titles and metadata.

Quick Start

Use the text-editing skill to add a rich text editor with bold, italic, and underline formatting controls to your SwiftUI note-taking view.

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 selection-based formatting?

Rich text editing in SwiftUI uses AttributedString to apply formatting constraints to selected text. This approach supports building functional editors with bold, italic, and underline controls for iOS 18 and later.

What's the best way to render Markdown content in SwiftUI Text views?

Rendering Markdown in SwiftUI Text views uses native Apple frameworks to display styled content inline. This approach supports basic Markdown formatting without requiring external dependencies or complex parsing logic.

How do I apply modern text styling in SwiftUI without deprecated APIs?

Modern text styling in SwiftUI uses current APIs like .foregroundStyle() and conditional bold or italic modifiers. This replaces deprecated styling options to ensure formatted text remains compatible across iOS versions.

Can I use AttributedString to build a formatting toolbar for a SwiftUI note-taking app?

AttributedString supports building formatting toolbars in SwiftUI note-taking apps by enabling selection-based formatting controls. Users can apply bold, italic, and underline styles to selected text while displaying styled titles and metadata.

Does SwiftUI rich text editing support custom formatting constraints on iOS?

SwiftUI rich text editing supports custom formatting constraints on iOS 18 and later using AttributedString. This allows developers to define specific formatting rules and control which styles users can apply within text editors.