Forum


Replies: 2   Views: 2373
Template list with html content
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  · 29-06-2018 - 07:13

Hello,

HTML can be transformed to Word as a WordFragment, just as almost any other content, to be added to documents.

We think you have three approaches to accomplish what you need:

· Use the wordStyles option available when importing HTML. On https://www.phpdocx.com/documentation/introduction/html-to-word-PHP you can check some samples about how to use this option.

· Clone the heading as many times as needed (https://www.phpdocx.com/api-documentation/docx-path/clone-elements-in-docx) and add the HTML as WordFragment (https://www.phpdocx.com/documentation/practical/wordfragments-and-wordml) using DOCXPath (https://www.phpdocx.com/api-documentation/docx-path/insert-elements-in-docx) or a custom placeholder.

· Add the content and use DOCXCustomizer (https://www.phpdocx.com/documentation/introduction/docxcustomizer) to set the heading styles to the strings you need. This feature is only available in Premium licenses.

Regards.