Skip to content

Word2007 Reader does not parse w:bookmarkStart/w:bookmarkEnd tags #2861

@calbahdev

Description

@calbahdev

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions