apple-text-drag-drop

Implement and debug text drag-and-drop in Apple text editors using UITextDraggable and UITextDroppable.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sitapix/apple-text --skill apple-text-drag-drop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apple-text-drag-drop
Source: https://github.com/sitapix/apple-text/tree/main/skills/apple-text-drag-drop
Command: npx skills add https://github.com/sitapix/apple-text --skill apple-text-drag-drop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables developers to implement, customize, and debug drag-and-drop interactions in Apple text editors, covering UITextDraggable, UITextDroppable, drag previews, and custom drop handling.

Core Features & Use Cases

  • Guidance on enabling drag on iPhone vs iPad, building custom drag items, previews, and drop proposals.
  • Scenarios for non-editable views, custom UITextInput drag/drop, and AppKit equivalents on macOS.
  • Use Case: Build a rich text editor with draggable selections and custom drop targets.

Quick Start

Follow this guide to enable and customize drag-and-drop in a sample Apple text editor view.

Frequently Asked Questions about apple-text-drag-drop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement text drag-and-drop in a UITextView on iOS?

To implement text drag-and-drop in a UITextView, conform to UITextDragDelegate and UITextDropDelegate to enable draggable text selections and custom drop proposals. This allows building drag items, previews, and handling drops safely.

Does UITextDroppable work with non-editable text views?

Yes, UITextDroppable works with non-editable text views by providing safe defaults and clear failure paths. You can handle drop proposals and interactions without requiring the view to be editable.

What is the best way to customize drag previews for Apple text editors?

The best way to customize drag previews for Apple text editors is by using UITextDragDelegate methods to build custom drag items and previews. This ensures visual feedback matches your app's design during text dragging.

How does text drag and drop differ between iPhone and iPad in iOS?

Text drag and drop differs between iPhone and iPad regarding touch handling and multi-window support. You need specific guidance to enable drag on each platform, building drag items and drop proposals accordingly.

How do I add drag and drop to a custom UITextInput view?

To add drag and drop to a custom UITextInput view, implement UITextDragDelegate and UITextDropDelegate protocols. This provides the necessary hooks for managing drag previews, drop proposals, and custom drop handling.

Are there AppKit equivalents for UITextDraggable on macOS?

Yes, there are AppKit equivalents for UITextDraggable on macOS. You can implement similar text drag-and-drop interactions using AppKit's text view components, covering drag previews and custom drop handling.