What problem does it solve?
This Skill eliminates the limitations of SwiftUI's basic TextEditor for macOS, enabling developers to build fully-featured rich text editors, code editors, and custom text input experiences with native AppKit performance and full system integration.
Core Features & Use Cases
- TextKit 2 Native Architecture: Leverage the modern TextKit 2 pipeline (NSTextContentStorage, NSTextLayoutManager, NSTextViewportLayoutController) for performant layout of large documents.
- Full NSTextView Control: Configure rich text editing, find bars, font panels, custom keyboard handling, and embedded text attachments for advanced use cases.
- SwiftUI Interop: Wrap NSTextView as NSViewRepresentable to use native AppKit text capabilities in SwiftUI applications.
- Use Case: Build a macOS code editor with syntax highlighting, line numbers, find/replace functionality, and custom keyboard shortcuts, or a rich text note-taking app with font styling and embedded media attachments.
Quick Start
Use the macos-text-and-input skill to implement a custom NSTextView-based code editor in your macOS app with line numbers, find bar support, and monospaced font configuration.