Forum


Replies: 3   Views: 3608
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 - 12:33

I found out that need wrap all text for example in paragraph. I just realised that my example htlm text has fail...missing the list part: $html = 'Lorem ipsum.... [ul][li]list1[/li][li]list2[/li][/ul]Lorem ipsum....'; My html content come from database therefore I can not affect that wrap it paragraph or for example span TAG text by text. So it means that in this case I have to write an own parser? So as you see my html content surround a [p] TAG: $docx->embedHTML('[p]'.$html .'[/p]', array('strictWordStyles'=>true, 'wordStyles'=>array('[p]'=>'description'))); ...but! The ul TAG break the paragraph contet and after the close ul TAG lost the format... I can not make that after the close ui TAG reopen the [p] TAG becasue the HTML text edited by the customer. I can not modified it!