Closed fEyebrow closed 8 months ago
JavaScript-created events generally will not trigger the browser's default behavior for the event.
Some browser driver systems allow you to trigger native events. This isn't something ProseMirror will help you with, though.
I have implemented the function of dragging and dropping images in the editor.
Then I want to add a test for the function. This is my code:
However, the result of the getHTML function is "\
\
".I tried to simulate the drop action with js in the development environment, but I found the image wasn't inserted. I tried to insert the image into the editor with the mouse, it was successful.
How to mock the drop action with js in prosemirror?