Hello,
I'm using wordFragment with addText and embedHTML and then adding that WF into the list item array, all the styles are applied like bold, italic and font size but unordered and ordered list i.e. <ul><li>Test Item 1</li><li>Test Item 2</li></ul> is not applied. it is showing me only text like "Test Item 1Test Item 2"
Following is the code snap:
$TestData = new WordFragment($this->docx); $TestData->addText('Test Code', ['bold' => true, 'fontSize' => 12]); $TestData->embedHTML('<ul><li>Test Item 1</li><li>Test Item 2</li></ul>', ['stri ctWordStyles' => true]);
$items = [ $TestData, ]; $docx->addList($items, 1, ['fontSize' => 10]);
I have advanced package of PHPDocx.
Note: this code is inside the Foreach loop, so it can run multiple times and this $TestData WF can be inside nestedList.
Thanks.