Forum


Replies: 2   Views: 1606
Ol and customliststyles are not thoroughly supported
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 msun  · 05-06-2020 - 20:38

We just upgraded to phpdocx v9.5 specifically hoping to address difficulties involving lists.

I'm finding that when we define a custom list-style, phpdocx yields an error when it encounters an OL element.

>>DOMDocument::loadXML() expects parameter 1 to be string, object given in file ....phpdocx/classes/CreateDocx.php on line 5164

https://www.phpdocx.com/en/forum/default/topic/1857

In this other thread, you indicate that this is basically by design:
>>To apply custom list styles, you need to use ul tags, not ol

Yet elsewhere in the documentation, you indicate:
>>Supported HTML tags and attributes
>>ul and ol: Are respectively parsed as unordered or ordered Word lists.

All of this particular behavior was working fine in previous versions. Would you agree that forcing us to use UL instead of OL violates the entire notion of the "HTML to DOCX" paradigm?

I understand that this is how DOCX works under the hood, but that's besides the point. Your users expect to be able to convert HTML into DOCX without jumping through hoops.

I'm finding that I must now refactor old logic to keep it in line with this new requirement, as well as add extra logic to address the requirement.

I hope that this will be addressed in the next version.