Given a paragraph, I can position the DocumentBuilder cursor to the end of the paragraph using moveTo(myParagraph). How can I position the cursor to the beginning of the paragraph? I want to insert a BookmarkStart node at the beginning of the paragraph.
I tried myParagraph.getParentSection().indexOf(myParagraph) to get the index of myParagraph. This returned 8. But when I tried moveToParagraph(index, 0), the cursor moved to another location further up in the document. The cursor moved to a cell within a table that was a couple of paragraphs above myParagraph.