I'm using PHPWord to generate .docx files from HTML. In my HTML file I've the following situation:
<ul><<li><span>test</span></li></ul>
When I execute the conversion, it shows an empty area. I tried to add the SPAN in parseChildNodes() method:
$cNodes = $node->childNodes;
if (count($cNodes) > 0) {
foreach ($cNodes as $cNode) {
// Added to get tables to work
$htmlContainers = array(
'tbody',
'tr',
'td',
'p',
'span'
);
if (in_array( $cNode->nodeName, $htmlContainers ) ) {
self::parseNode($cNode, $element, $styles, $data);
} else{
// All other containers as defined in AbstractContainer
if ($element instanceof AbstractContainer) {
self::parseNode($cNode, $element, $styles, $data);
}
}
}
}
But it doesn't work... It still shows a blank area. How can I show the SPAN content inside the LI list item?
Thank you in advance!