AgentStack
SKILL verified MIT Self-run

Swiftui Text Editing

skill-ariadoss-superskills-swiftui-text-editing · by ariadoss

SwiftUI text styling and rich text editing patterns. Use when displaying styled text, building rich text editors, working with AttributedString, implementing TextEditor with formatting, rendering Markdown, or creating selection-based formatting controls in SwiftUI.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-ariadoss-superskills-swiftui-text-editing

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README — it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ariadoss-superskills-swiftui-text-editing)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
today

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Swiftui Text Editing? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Styled Text Editing in SwiftUI

Patterns for displaying styled text and building rich text editors in SwiftUI.

When This Skill Activates

Use this skill when the user needs to:

  • Display styled text (bold, italic, colored, linked)
  • Build rich text editors with formatting toolbars
  • Work with AttributedString
  • Implement TextEditor with selection-based formatting
  • Render Markdown in SwiftUI
  • Create custom text formatting definitions

Decision Tree

What text task do you need?
|
+-- Display styled text (read-only)
|   +-- Simple modifiers -> Text("Hello").bold().foregroundStyle(.blue)
|   +-- Mixed styles -> AttributedString
|   +-- Markdown -> Text(try! AttributedString(markdown: "**Bold**"))
|
+-- Editable text
    +-- Plain text -> TextEditor(text: $text)
    +-- Rich/styled text -> TextEditor with AttributedString binding (iOS 18+)
    +-- With formatting toolbar -> iOS 18+ AttributedTextFormattingDefinition

API Availability

| API | Minimum iOS | Notes | |-----|------------|-------| | Text modifiers (.bold(), .italic()) | iOS 13 | Read-only | | AttributedString | iOS 15 | Rich text model | | Markdown in Text | iOS 15 | Inline Markdown only | | TextEditor(text:) | iOS 14 | Plain text editing | | TextEditor with AttributedString | iOS 18 | Rich text editing | | AttributedTextFormattingDefinition | iOS 18 | Custom formatting constraints | | Text selection reading | iOS 18 | textEditorSelection |

Text Styling Quick Reference

// Simple modifiers
Text("Hello world")
    .font(.headline)
    .bold()
    .foregroundStyle(.blue)
    .italic()

// AttributedString for mixed styles
var attributed = AttributedString("Hello world")
attributed[attributed.range(of: "Hello")!].font = .boldSystemFont(ofSize: 16)
attributed[attributed.range(of: "world")!].foregroundColor = .blue
Text(attributed)

Rich Text Editor (iOS 18+)

struct RichTextEditor: View {
    @State private var text = AttributedString("Start typing...")
    @State private var isBold = false

    var body: some View {
        VStack {
            HStack {
                Button("B") { isBold.toggle() }
                    .bold(isBold)
            }
            TextEditor(text: $text)
        }
    }
}

Markdown Support

// ✅ Works: inline Markdown
Text("**Bold**, _italic_, `code`, [link](https://apple.com)")

// ❌ Does not work in Text: block Markdown
Text("# Heading\n- List items\n> Blockquote")

Text supports only inline Markdown:

  • ✅ Bold (**), italic (_), inline code (` `), links ([]()`)
  • ❌ Line breaks, block formatting, lists, tables, code blocks, images, blockquotes

For full Markdown rendering, use a third-party library or render to AttributedString first.

Top 5 Mistakes

| # | Mistake | Fix | |---|---------|-----| | 1 | Using deprecated .foregroundColor() | Use .foregroundStyle() | | 2 | Missing value: in .animation() | .animation(.default, value: someState) | | 3 | Expecting full Markdown in Text | Only inline Markdown works; block Markdown requires conversion | | 4 | Recreating AttributedString every render | Cache it with @State or compute once | | 5 | Using TextEditor(text:) for rich text | Use AttributedString binding for styled editing (iOS 18+) |

Review Checklist

  • [ ] Using .foregroundStyle() not .foregroundColor()
  • [ ] AttributedString cached, not recreated on every render
  • [ ] Markdown expectations match what Text actually supports
  • [ ] iOS version requirements checked for APIs used
  • [ ] Accessibility: Dynamic Type support in custom styled text

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.