Control of paste insert point

Hi !

pasting some html often fails for me, because current selection does not allow what i paste inside, and prosemirror opens up its belly and spill it out all over the place. Instead i’d like to control the insert point when pasting, because from the dom attributes i can already tell it’s going to need to be inserted between such or such parent of selection. I don’t think prosemirror-view currently allows that ? Is this something possible to add to prosemirror ?

You’re looking for https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste, we implement custom paste logic ourselves since we allow you to drag and drop “blocks” between editors on a page and not all positions are valid.

Right ! It’s odd that i overlooked that. Maybe i tried and got lost somehow.