How can I read the line break from a value with JavaScript and replace all the line breaks with elements?
Example:
A variable passe
This works for input coming from a textarea
str.replace(new RegExp('\r?\n','g'), '');