Apple Text Pasteboard Handler
Customizes clipboard operations and rich-text sanitization for Apple's TextKit stack on iOS and macOS.
This skill provides specialized guidance for implementing advanced copy, cut, and paste functionality within Apple's text-editing ecosystem, including TextKit, UITextView, and NSTextView. It helps developers solve common clipboard challenges such as stripping unwanted source styles, remapping fonts during paste operations, handling images as inline NSTextAttachments, and implementing modern NSItemProvider type negotiation. Whether you are building a markdown editor that needs to sanitize incoming RTF or a creative tool requiring custom UTType round-tripping, this skill ensures robust, thread-safe, and user-friendly pasteboard behavior.
Key Features
01NSItemProvider type negotiation for high-fidelity data exchange
02Cross-platform clipboard management (UIPasteboard and NSPasteboard)
03Automatic image-to-attachment conversion with size scaling
040 GitHub stars
05Rich-text sanitization and attribute remapping for clean pastes
06Custom UTType implementation for private app-specific formats
Use Cases
01Implementing custom copy/paste logic for proprietary document formats
02Preventing external font and color styles from polluting a clean text editor
03Handling programmatic pastes that must respect specific typing attributes