Forum


Replies: 4   Views: 3145
Html in template
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 champton  · 24-06-2011 - 17:35

I want to add HTML to a variable in my template.docx file. The HTML is being passed from a textarea as a post and when it comes through in my docx file it is HTML not formatted for word

$docx->addTemplateVariable('event_details', $details, 'html');

but it works when I enter the actual HTML in the function and not pass it as a string.

$docx->addTemplateVariable('event_details', '<strong>This is a test</strong>', 'html');

any thoughts as to why I can not pass the HTML as a string received by a post?????