Bookmarks can be written to, but not read from documents using IOFactory::load.
It would be great if PHPWord can capture which tags are within the bookmark's start and end boundaries for easy lookup of elements that are referenced, perhaps as an accessible member within PhpOffice\PhpWord\Element\Bookmark.php.
See attached example document:
bookmarks.docx
Here is one of the relevant instances within the XML:
<w:p w14:paraId="2ABFC0F3" w14:textId="2D416A56" w:rsidR="008B6B6B" w:rsidRDefault="00DB4E8F" w:rsidP="00DB4E8F">
<w:proofErr w:type="spellStart"/>
<w:r>
<w:t>Out</w:t>
</w:r>
<w:bookmarkStart w:id="0" w:name="BookmarkInWord"/>
<w:r w:rsidRPr="00DB4E8F">
<w:rPr>
<w:color w:val="EE0000"/>
</w:rPr>
<w:t>inside</w:t>
</w:r>
<w:bookmarkEnd w:id="0"/>
<w:r>
<w:t>side</w:t>
</w:r>
<w:proofErr w:type="spellEnd"/>
</w:p>
Bookmarks can be written to, but not read from documents using IOFactory::load.
It would be great if PHPWord can capture which tags are within the bookmark's start and end boundaries for easy lookup of elements that are referenced, perhaps as an accessible member within PhpOffice\PhpWord\Element\Bookmark.php.
See attached example document:
bookmarks.docx
Here is one of the relevant instances within the XML: