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 worked for me when value came from a TextBox:
string.replace(/\n|\r\n|\r/g, '');