Hi,
I have the Premium v.14 of phpdocx.
I've tried to get HTML headline (<h1>, <h2>, ..) to be used as Word headline, but I just can't get it to work.
When I click on the headlines in Word, they are marked as "Standard", not as a HL.
// in the word template I have the three headlines (Heading1PHPDOCX, Heading2PHPDOCX, ...)
$docx = new \Phpdocx\Create\CreateDocxFromTemplate($word_file);
....
// embed options
$embedHTMLoptions = [
'disableWrapValue' => true,
'downloadImages' => true,
'removeLineBreaks' => true,
'useHTMLExtended' => true,
'wordStyles' => [
'<h1>' => 'Heading1PHPDOCX',
'<h2>' => 'Heading2PHPDOCX',
'<h3>' => 'Heading3PHPDOCX',
],
'strictWordStyles' => true //with and without this option
];
// tried this
$docx->embedHTML($head_html . '<p class="h1">'.$table_of_contents.'</p>', $embedHTMLoptions);
// also tried this
$docx->embedHTML($head_html . '<p class="h1" data-style="Heading1PHPDOCX">'.$table_of_contents.'</p>', $embedHTMLoptions);