Hi, I would like to ask if the replaceTableVariable function can now accept HTML contents. I have read previous posts but they were old posts (2015). I would like to update if it is now available and how can I achieve this.
Thank you.
Hi, I would like to ask if the replaceTableVariable function can now accept HTML contents. I have read previous posts but they were old posts (2015). I would like to update if it is now available and how can I achieve this.
Thank you.
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.