draft-convert
draft-convert copied to clipboard
After convertFromHtml span with whitespace doesn't keep the inline styles
Before convertFromHtml
the content looks like this:
<p><span style="font-size: 55px"> </span></p>
but after conversion it remove all the inline styles from the span with
(like a font size in this case, so when I make the new line with space character of particular font size to have a kind of margin between the lines - it just reset it to default, so html in !== html out), why do it even touch it 🤔 (I mean it should be optional to trim the characters or removing the styles as it changes the content)?
The code that do that(starting point) is: https://github.com/HubSpot/draft-convert/blob/master/src/convertFromHTML.js#L309