forked from mikenikles/html-to-react
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
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!
MarcoMaderaElegantSoft
Metadata
Metadata
Assignees
Labels
No labels