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