Forum


Replies: 3   Views: 3797
Predefined word style lost in embedhtml() if html contains ul tag
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 Sven May  · 12-05-2015 - 08:23

Hi! As I experienced if I insert an HTML text into word document and the HTML text contains ul TAG after the close ul TAG the text lost the set predefined word style. Example: $html = 'Lorem ipsum....
Lorem ipsum....'; $docx = new CreateDocxFromTemplate($template); // $template doc include the predefined word stlye... $docx->embedHTML('[p]'.$html .'[/p]', array('strictWordStyles'=>true, 'wordStyles'=>array('[p]'=>'description'))); $docx->createDocx('generated_doc'); Of course change all [] brackets to the right HTML TAG brackets. So after the close ul TAG the second "Lorem ipsum..." text wont formatted with description style... Thank you!