Setting "dragging" not working

Greetings, I’ve been trying to trigger dragging through an external drag handle button with not success. From what I found in Tiptap and other examples, it should work just setting the dragging property of the editor, but I can’t get it to work.

JS, not TS :

    let slice = view.state.selection.content();
    view.dragging = { slice: slice, move: true };

Are there other steps to take in order to do that ?

Thanks you

view.dragging is not something external code is supposed to assign to. If you put a drag handle inside of your node view and set that to draggable, the library should just do the right thing via the browser’s native drag behavior.

Hi, I achieved my goal and just wanted to let you know about my experience.

Setting a selection and view.dragging is how TipTap and other plugins do it.

I tried with a nodeView after your reply, it worked fine but then I don’t get to show/hide the handle when hovering Nodes even when setting up a plugin and events for that, because the nodeView function selectNode doesn’t trigger when clicking on a Node, it triggers only if pressing CTRL+Click.

I got it working by doing something similar to TipTap and other plugins, using events and setting view.dragging, it works perfectly now even though it’s not designed to be set externally.