Forum


Replies: 11   Views: 2828
Handling of lists..
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 25-08-2019 - 09:30

Hello,

We are running the following script:

<?php

require_once 'classes/CreateDocx.php';

$docx = new CreateDocx();

$html = '
<ul class="textbox-list">
    <li>Have you heard of this animal before?</li>
    <br><br><br><br><br><br>
    <li>What do you already know about this animal?</li>
    <br><br><br><br><br><br>
</ul>
';
$docx->embedHTML($html);

$docx->createDocx('output');

with the latest release of phpdocx (the same version you are using) and the output is correct:

https://i.imgur.com/h3JFaNr.jpg

We have also tested it with phpdocx 8 and phpdocx 7 and the output is the same.

We also see that your HTML has two li tags but the output you get has three li items. Maybe you are adding other HTML or the CSS textbox-list is applying some style or you are enabling any additional option?

Please run the previous script standalone, changing only the path to CreateDocx.

Did you also try the other approach (the margin-bottom style)?

Regards.