fix: enable drag and drop reordering in Edra editor
Add return false to drop handler so ProseMirror's Dropcursor extension can handle the actual node movement. Previously the handler would intercept drops but not perform any movement.
This commit is contained in:
parent
78ef0c3d18
commit
1190bfc62e
1 changed files with 4 additions and 0 deletions
|
|
@ -387,6 +387,10 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey:
|
|||
const slice = new Slice(Fragment.from(newList), 0, 0)
|
||||
view.dragging = { slice, move: event.ctrlKey }
|
||||
}
|
||||
|
||||
// Return false to let ProseMirror's default drop handler (from Dropcursor) take over
|
||||
// This allows the actual node movement to happen
|
||||
return false
|
||||
},
|
||||
dragend: (view) => {
|
||||
view.dom.classList.remove('dragging')
|
||||
|
|
|
|||
Loading…
Reference in a new issue