draftjs-to-html
draftjs-to-html copied to clipboard
Unnecessary new line \n character
Hey @jpuri !
I was trying to convert a draft to html. While doing so, I was running to an issue that each block was seperated by a \n
character. This seemed to be originating from https://github.com/jpuri/draftjs-to-html/blob/c02452e3ce6719f84f38d39f8f9b0a9e32bf871f/lib/draftjs-to-html.js#L615
Is there any workaround where the new line character is not the delimiter?
Thank you
totally agree. this is causing huge trouble when you set white-space: break-spaces;
or pre-wrap
.
+1
+1
@iamswain25 @antonwestman if I it will helps you use this regular for delete "\n" rawString.replace(/[\r\n]+/g, '')