A list element with <br> tag is not adding break line or a new line in the word document when converting HTML to Word.
- Code: Select all
<div style="font-size:11pt">
<div style="list-style-position:outside; margin-bottom:16px; text-align:center">
<strong>Break line test</strong>
</div>
<div style="list-style-position:outside; margin-bottom:16px"><br></div>
<div style="list-style-position:outside; margin-bottom:16px">
<span style="background-color:#e74c3c">Below section will fail to add a line break when converting HTML to Word</span>
</div>
<ol start="1" style="list-style-type:lower-alpha">
<li style="text-align: justify; margin-bottom: 16px; list-style-position: outside;">
List with a break line element directly inside the list element
<br>
One
<br>
Two
<br>
Three
</li>
</ol>
<div style="list-style-position:outside; margin-bottom:16px; text-align:justify"><br></div>
</div>
But when the content of list element is wrapped around a div element, html to word conversion adds a new line as expected.
- Code: Select all
<div style="font-size:11pt">
<div style="list-style-position:outside; margin-bottom:16px; text-align:justify"><span
style="background-color:#2ecc71">Below section will convert HTML to Word with break line</span></div>
<ol>
<li style="list-style-position: outside; margin-bottom: 16px; text-align: justify;">
<div>
<u>List with break line element within a div element </u><br>
<span>One:</span>
<br>
<span>Two;</span>
<br>
<span>Three;</span>
<br>
<span>Four.</span>
</div>
</li>
</ol>
<div style="list-style-position:outside; margin-bottom:16px; text-align:justify">
Text wrapped in div tag with line break
<br>
One
<br>
Two
<br>
Three
</div>
</div>
Above is how it should work without having to wrap contents of list element in a div. In HTML when you create a ordered or unordered list there is no necessity to wrap its lists content in another wrapper. Can you please check.
Please note that I am using the latest hotfix version of Spire doc and I use Windows 11 64-bit operating system and my region setting is United States and English.
Thanks for your support!
Jalpa