How do I replace all line breaks in a string with <br /> tags?
Jak
858
Points
132
Posts
|
How do I replace all line breaks in a string with <br /> tags? |
Answers
Rahul M...
4822
Points
23
Posts
|
Hi, Example: str = str.replace(/(?:\r\n|\r|\n)/g, '<br />');
Posted On:
24-Feb-2015 15:46
|