Generate prosemirror doc out of selection

Creating an empty doc with createAndFill, and then inserting the selection content in it with a Transform and replace should work.