Hi,
I'm using the TransformDocAdvHTML to transform a previously created docx to HTML. Consider the following word content:
$itemList = array(
'Line 1',
array(
'Line A',
'Line B',
'Line C'
),
'Line 2',
'Line 3',
);
$docx->addList($itemList, 2);
$docx->addText('ordinary text line');
When tranforming to HTML, it gives me a correct HTML structure, such as:
<ol>
<li>Line 1</li>
<ol>
<li>Line A</li>
<li>Line B</li>
<li>Line C</li>
</ol>
<li>Line 2</li>
<li>Line 3</li>
<ol>
<p>ordinary text line</p>
HOWEVER, if the list ends with the nested list item, as follows:
$itemList = array(
'Line 1',
array(
'Line A',
'Line B',
'Line C'
),
);
$docx->addList($itemList, 2);
$docx->addText('ordinary text line');
...then the <ol> tag is not closed properly and the resulting HTML looks like this:
<ol>
<li>Line 1</li>
<ol>
<li>Line A</li>
<li>Line B</li>
<li>Line C</li>
</ol>
<p>ordinary text line</p>
[AND ALL OTHER CONTENT ALSO SHOWS WITHIN THIS <ol> TAG]
<ol>
As you can see, the <p> tag and all other html comes before/within the closing </ol> tag. But it should come after.
Is there an easy "fix"?
Using version 8.0, advanced.
Thanks!