I'm encountering an issue when converting docx document into HTML with PHPWord library (https://github.com/PHPOffice/PHPWord).
Here is the code snippet I use:
$phpWord = \PhpOffice\PhpWord\IOFactory::load('test.docx');
$htmlWriter = new \PhpOffice\PhpWord\Writer\HTML($phpWord);
$htmlWriter->save('test.html');
The issue is that each block of text is encapsulated in <p>
tags regardless if I defined titles in the docx document. I would expect <h1> <h2>
... tags to be generated. Bullet list are lost too.
Does it work as designed or did I miss something?
Thank you for your feedback.
Regards