I’m using the PHPWord package in Laravel to replace placeholders in a DOCX template.
I have a placeholder ${html} in my DOCX file, and I’m trying to replace it with HTML content like:
<p>Hello,<br><br><strong>Welcome</strong></p>
Currently, PHPWord is inserting the raw HTML tags as text, but I want the content to be rendered with proper formatting (bold text, line breaks, etc.).
I’ve checked the PHPWord documentation but couldn’t find a clear solution for HTML parsing. Any suggestions or examples would be appreciated.