Hello, I’m trying to perform a split from a selection and this works well…
…unless a boundary of the selection is the start or the end of the paragraph. In such a case the split occurs but leaves the original paragraph empty.
For example, splitting “Hello” with “ell” selected produces paragraphs “h”, “ell”, “o”,
but splitting it with “Hell” selected produces “”, “Hell”, “o”
and splitting it with “ello” selected produces “H”, “ello”, “”
How can I manage to avoid empty paragraphs remaining?
You didn’t mention how you are doing the splitting, but if you’re making direct calls to Transform.split, could you just not split when the position is at the end or start of its parent node?