Forum


Replies: 3   Views: 203
Replacevariable to link
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  · 11-03-2026 - 16:46

Hello,

You can use the getWordStyles method to get content styles, but this requires parsing the information returned by this method.

To apply or mix placeholder styles with new content when using template methods, the best approach is to use the stylesReplacementType option available in the replaceVariableByWordFragment and replaceVariableByHTML methods. This option allows placeholder styles to be automatically applied and combined during replacements. As detailed in the documentation, this option is available only with a Premium license. You can upgrade to Premium on the "MY PHPDOCX" page after logging in.

Regards.