Hi,
when inserting HTML lists, empty list entries appear at the beginning of the inserted list since version 19.3 (also tested with version 19.7).
Steps to Reproduce
Using the following code:
DocumentBuilder builder = new DocumentBuilder();
List list = builder.getDocument().getLists().add(ListTemplate.BULLET_CIRCLE);
builder.getListFormat().setList(list);builder.insertHtml("
<ul><li>Item</li></ul>
");
builder.getDocument().save(“result.docx”);
Version 19.2 or older:
In version 19.2, the first visible list entry in the document is the list item with text “Item”. The bullet point of the list item is not from type BULLET_CIRCLE but the default bullet point (filled circle).
Version 19.3 or newer:
In Version 19.3, the first visible list entry in the document is an empty list item with a bullet point of type BULLET_CIRCLE.
The second list item has the text “Item” with a default bullet point (filled circle).
html_list.zip (11.6 KB)
Why is an empty list item inserted at the top of the list only because the list format is set?
Best regards,
Ingo Gutzeit