how to remove <br> in front of text in js code example
Example: replace all br tags within node with paragraph opening and closing tags
//My suggestion will be to split the text by <br>:
var lines = content.split("<br>");
//Now you can wrap each line in a <div>:
var newContent = "";
for(var i=0,l=lines.length;i<l;i++){
newContent += "<div>"+lines[i]+"</div>";
}