Hello,
phpdocx 6.5 added support for using WordFragments in replaceListVariable and replaceTableVariable methods. You can create a WordFragment from HTML and add it as any other content.
Please check the included sample Templates/replaceTableVariable/sample_3.php that illustrates how to add WordFragments with replaceTableVariable. This sample adds link and image WordFragments, but you can create a WordFragment from almost any content, for example from HTML:
$htmlWordFragment = new WordFragment($docx);
$htmlWordFragment->embedHTML($html);
Regards.