Selection in node view

Thanks for the patch!

Ah right, now that you mention zero-width spaces I remember it being mentioned in Discussion: Inline nodes with content. Thanks for the tip and explanation!

The zero-width space does create a boundary, but as described in the linked topic you get the behavior where the same cursor position is used to represent two different actual positions, which is not what I was aiming for. I experimented a bit myself and found that if I add an empty span on both sides, they also function as boundaries, but without the downsides of introducing additional characters. It is an ugly workaround, but it seems to work just fine, so I will be using that for now.

1 Like