Forum


Replies: 1   Views: 262
Replacevariablebyhtml keeping word styles
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 17-04-2025 - 07:06

Hello,

We have done a quick test with your HTML and replaceVariableByHTML, and it's working correctly. Maybe you are not using the required license or phpdocx version.

Please note that you need to use a Premium license with the stylesReplacementType option to keep or mix placeholder and HTML styles when replacing a placeholder with HTML. Please check the documentation available on https://www.phpdocx.com/documentation/cookbook/keep-font-sizes-templates-importing-html

Regards.