Wondering if there's a tool out there or an easy way to convert line breaks to paragraphs in HTML. I don't know anything about scripting or anything outside of HTML and CSS really but I'm willing to try, just wondering if there's an easy tool or utility to use.
Convert line breaks to paragraphs in HTML?
1.2k Views Asked by user3155353 At
4
There are 4 best solutions below
1

You could stick your text in a <pre>
tag, however this might have some undesirable effects on the way your text is displayed.
1

1) Look up SublimeText2 text editor - It is very useful in general and I always use it in situations like yours.
2) Use the Find command (command + F) on a mac
3) Select the the regex option to search for \n (the first button on the far left)
4) Press (Option + Return) to select all newlines
5) Once selected simply replace all the line breaks with the elements you'd rather fill that space.
You'll have to install it, but will be glad you did.
If you are referring to line breaks as in a newline from some data from a database or some other data storage you can do a
var newText = receivedContent.replace('\n','<br/>');