Disable drop image on the editor and enable drop on some nodeview

I defined my image node along with a nodeview. The nodeview shows drop an image when the attribute src is empty. Drop and dragover event listener are also added.

But when I drag an image over the nodeview, a horizontal cursor line is shown above or below it in the editor, although the right event handler is called when I drop the image.

But what I want is that when I drag an image over the nodeview, no cursor line shows in the editor, which is quite easily misunderstood to users.

The line is drawn by the prosemirror-dropcursor package, which currently has no functionality for disabling its behavior when the cursor is over a given node. But a pull request to add such a thing would be welcome.

1 Like