-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Sample Code:
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$html = '<table><tr><td>test</td></tr></table>';
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html);
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$objWriter->save('test.docx');
Expected Output:
Table with one cell containing the word "test".
Actual Output:
Blank
From stepping through the code quickly, the issue seems to be caused by the following if condition in parseChildNodes():
if ($element instanceof AbstractContainer) {
self::parseNode($cNode, $element, $styles, $data);
}
Commenting out the if condition then allows for the sample code above to produce the expected output.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.