I have a problem modifying an existing document. I find a field that I want to remove and remove it:
Node node = field.remove();
The node is now the paragraph that contained the field. I remove it with node.remove().
But now I need to insert a new paragraph or other block content at the location of the old node just removed. I have tried many ways with DocumentBuilder to set the cursor with moveTo() and other appends but have been unable to find the right combination.
I know this must be straightforward but I’m at a bit of a loss. Any help would be greatly appreciated!