Installation
Basic Usage
Styling the Drag Handle
Configuration Options
Function that renders and returns the drag handle element.
Configuration for position computation using the Floating UI library. See Floating UI documentation for details.Default:Example:
Function that returns a virtual element for positioning. Useful when the drag handle needs to be positioned relative to a specific DOM element.
Whether the drag handle is locked in place and visibility.Default:
falseCallback function called when a node is hovered over or unhovered.Parameters:
node: The hovered node (or null if unhovered)editor: The editor instance
Callback fired when dragging starts.
Callback fired when dragging ends.
Enable drag handles for nested content like list items and blockquotes.Default: With configuration:Nested Options:
falseSimple enable:Custom rules to determine which nodes are draggable. These run after the default rules.
Whether to include default rules for common cases like list items.Default:
trueRestrict nested dragging to specific container types.
Control when to prefer parent over nested node based on cursor position.
'left'(default): Prefer parent near left/top edges'right': Prefer parent near right/top edges (for RTL)'both': Prefer parent near any horizontal edge'none': Disable edge detection
Commands
Lock the drag handle in place and visibility.
Unlock the drag handle.
Toggle the drag handle lock state.