How niclasdev63/tiptap-extension-global-drag-handle works
Main Components
a) Core Components:
• Tiptap Editor Integration Point
• GlobalDragHandle Extension Core
• Configuration Manager
• Event Handler System
• DOM Manipulation Layer
b) Feature Modules:
• Drag Handle Manager
• Auto-scroll Controller
• Node Selection System
• Custom Node Handler
┌─ Application Layer ─────────────────────┐
• [Tiptap Editor Instance] │
• ↕ │
• [GlobalDragHandle Extension] │
• Core Services ──────────────────────────┤
• ┌─ Configuration ─┐ ┌─ DOM Handler ─┐ │
• dragHandle │ │ - Selection │ │
• Width │ │ - Node │ │
• scrollThresh │ │ Manipulation│ │
• ┘ └──────────────┘ │
• Feature Services ────────────────────────┤
• ┌─ Drag System ──┐ ┌─ Scroll ──────┐ │
• Handle │ │ - Threshold │ │
• Management │ │ Control │ │
• Event │ │ - Auto-scroll │ │
• Handling │ │ Logic │ │
• ┘ └──────────────┘ │
• ┘
Important Elements to Highlight
a) Integration Points:
• How the extension connects to Tiptap
• Configuration injection points
b) Data Flow:
• DOM manipulation paths
• Configuration data flow
c) External Dependencies:
• Optional integration with AutoJoiner extension
• CSS styling integration points
┌─ Configuration Options ─────────┐
• dragHandleWidth │
• scrollTreshold │
• dragHandleSelector │
• excludedTags │
• customNodes │
• ┘
Implementation Details
Relationship between:
• Custom node handling
• Excluded tags processing
• DOM event listeners
• Scroll threshold monitoring