Drag and drop placeholder?

Hi,

when dragging a block node, it feels like it would be easier for the user if some (customizable) placeholder was shown instead of the text caret.

Is this easy to do ? is this a job for a plugin or for a core prosemirror module ?

1 Like

The problem that makes this difficult is that dragover/dragenter handlers do not get access to the clipboard, so they don’t know what is actually being dragged, and thus it’s hard to figure out what kind of placeholder to show.

In the case where the drag originates from the editor, we can know, but I’m not sure having different behavior in different situations is all that desirable.

Would this be easy to implement with a plugin or it needs changes to the core?

Having a good user experience on one of the behaviours is better than having a bad user experience on both, consistency is definitely not a problem in this case.

The core would have to export information about what is being dragged. You could try to write a plugin using view.dragging.slice, and see how it goes, but I’m not currently committing to keeping that stable (seeing a working placeholder plugin implementation might convince me).