MoveStep for collaborative editing

Hello! I am currently working on a Notion-like editor, and I would like to make things movable with some shortcuts. Here is an example of what I mean, where the user would move the third paragraph up: Initial state:

<p>A</p>
<p>B</p>
<p>C</p>

After transaction:

<p>A</p>
<p>C</p>
<p>B</p>

My issue is I would like it to work properly in collaborative editing, which means that if some other user edited the third paragraph to “D”, the final state would be the following:

<p>A</p>
<p>D</p>
<p>B</p>

I don’t think I can use ReplaceAroundStep for that because there are 2 different parts we want to preserve, but maybe I am missing something. So my question is: Is there currently a way to achieve what I described or do I need to implement my own Step class to do it?

Thank you in advance for your reply

There isn’t, and you can’t implement it yourself either. ProseMirror’s position mapping system is not able to describe changes that move content across other content.

1 Like

There isn’t, and you can’t implement it yourself either. ProseMirror’s position mapping system is not able to describe changes that move content across other content.

Ah I was afraid of that… Thank you for your quick reply!