Forum


Replies: 7   Views: 2768
Embedhtml issue
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  · 06-07-2017 - 15:37

Hello,

You are adding a paragraph inside a list item, so when phpdocx transforms HTML to DOCX it generates a w:p for the list item and other w:p for the paragraph (both elements are paragraph in OOXML).

We recommend you to avoid adding a paragraph element inside a list item:

$docx->embedHTML('<ul><li>Some text.</li></ul>');

or use an inline tag:

$docx->embedHTML('<ul><li><span>Some text</span>.</li></ul>');

Regards.