html-to-docx
html-to-docx copied to clipboard
support for line breaks like <br> tag
-
The equivalent of force line break using
<br>is<w:br/>in DOCX XML openofficexml. -
Linebreak for paragraph is working fine.
As of now the library converts <br> to
<w:pPr>
<w:spacing w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr />
</w:r>
- which is correct for line breaking a paragraph ,but doesn't seems right for force line break.
- For example: converting "hello I am sam <b>some bold</b> <br><br> some other texts" to DOCX XML is not working , as linebreak under same text run , rather than different paragraphs/text runs.
- Instead
<w:br/>is correct conversion as per documentation of openofficexml.
After conversion to docx, in < br/> It will be followed by a blank line