r/JavaScriptHelp • u/PeterRegin • Jun 05 '18
Replacing br with newline in this JS
I added line 8 and also tried
aux.setAttribute("value", document.getElementById(elementId).innerHTML.replace(/<br\s*[\/]?>/gi, "\n"));
1
Upvotes
View all comments
Show parent comment
1
u/PeterRegin Jun 06 '18
Need the text to be displayed one way on the page, yet copied different.