Question about using prosemirror for an "ide" style project online

Hi everyone :waving_hand: .

I’ve been using prosemirror for a 2 months now in a project i’m currently working on ^^ (great tools by the way !)

I won’t explain everything but the idea is that you have a document with paragraph / nested paragraph and inline content as paragraph heading. The inline content should be split in blocs where each block represent an “instruction”.

I thought a lot about this splitting in blocs, the version i currently have using mark that i recalculate each rendering. The problem is that it mess up selection a bit. You can’t really differentiate between the last position of the a block and the first position of the next block, because i add spacing between them so it creates two dom selecting point for one prosemirror point.

I was thinking of moving to a node based splitting, it would fix the selection problem, but i’ll need to redo the whole thing :’(.

I was wondering if some people here tried to do something in this direction ? Or if some people that used the library more than me have any thought about this problem.

N.B : I also have a lot of problem with the default deleting algorithm and i don’t know if it’s normal to have to overwrite this feature of if it means i did something wrong in my schema.