Executing this code:
const htmlInput = '<p ><span style="white-space:pre-wrap">TEXT</span></p>';
const htmlToReactParser = new HtmlToReactParser();
const reactElement = htmlToReactParser.parse(htmlInput);
const reactHtml = ReactDOMServer.renderToStaticMarkup(reactElement);
I get this as parsed:
<p><span style="white-space:pre-wrap">TEXT</span></p>
But the correct JSX should be:
<p><span style={{ whiteSpace: 'pre-wrap' }}>TEXT</span></p>
Problems rendering the style.
Any solution to this? Thanks in advance!
Executing this code:
I get this as parsed:
<p><span style="white-space:pre-wrap">TEXT</span></p>But the correct JSX should be:
<p><span style={{ whiteSpace: 'pre-wrap' }}>TEXT</span></p>Problems rendering the style.
Any solution to this? Thanks in advance!