Forum


Replies: 4   Views: 4294
Highlight/background color for templatevariable
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 jorgelj  · 18-10-2013 - 08:18

Hello,



Sorry, background-color is supported by <p> (and other tags like tables, lists...). This is a tested example:



$html = '<p style="font-family: Arial;font-size:11pt;background-color: yellow;">9</p>';

$docx->replaceTemplateVariableByHTML('FIELD_BK', 'inline', $html);



Regards.