What problem does it solve?
Building custom text editors on Apple platforms requires satisfying dozens of overlapping system contracts for input, IME composition, selection, undo, and Writing Tools, with a single misstep causing silent, hard-to-diagnose breakage like TextKit 1 fallback, cursor jumps, or lost formatting. This skill eliminates that guesswork with verified, up-to-date patterns for the Swift 6 / iOS 26 / macOS 26 era.
Core Features & Use Cases
- Full custom editor support: Complete guidance for implementing the UITextInput (iOS) / NSTextInputClient (macOS) contract for canvas-rendered code editors, game UI text fields, and other non-standard editing surfaces.
- Stock view customization: Seams for modifying UITextView / NSTextView behavior including edit menus, selection constraints, paste sanitization, and spell check configuration without reimplementing the entire input stack.
- TextKit & Writing Tools integration: Guardrails against accidental TextKit 2 to 1 fallback, guidance for integrating Apple Intelligence Writing Tools, and support for AttributedString-based rich text editing in SwiftUI TextEditor.
- Use Case: A developer building a Markdown code editor for iPadOS can use this skill to correctly implement CJK IME support to fix cursor jump bugs, add syntax highlighting without polluting the undo stack, and ensure Writing Tools works in inline mode instead of falling back to panel-only.
Quick Start
Use the text-editing skill to add syntax highlighting and CJK IME support to your custom iOS code editor while avoiding TextKit 1 fallback that breaks Writing Tools and custom cursors.