You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When converting HTML that contains ordered (ol) or unordered (ul) lists to OpenXML, the bullet points or numbered items are not indented correctly in the resulting Word document. Items appear aligned with the left margin instead of being indented.
Expected behavior
Ordered and unordered lists in the Word document should reflect the same indentation as seen in HTML rendering.
Repro
usingDocumentFormat.OpenXml.Packaging;usingDocumentFormat.OpenXml;usingHtmlToOpenXml;usingvarstream=newMemoryStream();usingvardocument=WordprocessingDocument.Create(stream,WordprocessingDocumentType.Document);varconverter=newHtmlConverter(document.AddMainDocumentPart());awaitconverter.ParseBody(""" <p>unordered list:</p> <ul> <li>first list item</li> <li>second list item</li> </ul> <p>ordered list:</p> <ol> <li>first list item</li> <li>second list item</li> </ol> """);document.Save();File.WriteAllBytes("converted.docx",stream.ToArray());
Screenshots
HTML:
Converted:
The text was updated successfully, but these errors were encountered:
Describe the bug
When converting HTML that contains ordered (ol) or unordered (ul) lists to OpenXML, the bullet points or numbered items are not indented correctly in the resulting Word document. Items appear aligned with the left margin instead of being indented.
Expected behavior
Ordered and unordered lists in the Word document should reflect the same indentation as seen in HTML rendering.
Repro
Screenshots
HTML:
Converted:
The text was updated successfully, but these errors were encountered: