I’ve found that after updating to commit 90a8bfbf3989febaf83dee41b0c089385567a921, drop events now unexpectedly trigger transformPasted in my implementation. To handle this, I need to skip certain transformPasted logic specifically for drop events, but there’s no way to distinguish between paste and drag actions in the current implementation.
Potential Solutions:
Defer null assignment: Set view.dragging = null after executing transformPasted in the paste handler, enabling drag state detection during transform.
Modify deletion order: Execute tr.deleteSelection() before transformPasted for drag operations. This better aligns with the drag’s “cut-paste” nature (vs. “copy-paste”), as the source content is removed first.
I defined “id” attribute in node schema, and need to make sure ids in the doc remain unique. In transformPasted, I check for duplicate node ids between the slice and the doc - if there’s a duplicate, I assign a new id. This way, when cutting and pasting, the id stays the same, but when copying and pasting, the id changes (which is what I want).However, the problem is that dragging causes the id to change too, which isn’t what I expected.