Txt Swiftui Interop

Determine which AttributedString attributes survive the SwiftUI/TextKit boundary, what SwiftUI Text actually renders vs silently ignores, and how AttributedString converts to and from NSAttributedString. Covers attribute scopes (FoundationAttributes, SwiftUIAttributes, UIKitAttributes, AppKitAttributes), the SwiftUI.Font vs UIFont mismatch, presentationIntent rendering gaps, scope-aware conversion, and inline image strategies. Use when an attribute set on AttributedString doesn't render in SwiftUI Text, when conversion to UITextView loses styling, when Markdown headings or lists don't appear, or when bridging shared text content between SwiftUI and a wrapped UITextView. Do NOT use for wrapping UITextView mechanics (txt-wrap-textview) or for the iOS 26 SwiftUI TextEditor APIs (txt-swiftui-texteditor).

sitapix 5486744 14.4 KB Updated

File contents

sitapix/apple-text/tree/main/skills/txt-swiftui-interop commit 5486744d75

Frequently asked questions

npx skillmds@latest add sitapix/txt-swiftui-interop