Answers for "replace all /n to <br> in html angular"

2

php replace \n by <br>

$var = str_replace(array("\r\n","\n"),'<br>', $var);
Posted by: Guest on November-01-2020
0

javascript replace <br> with n

var str = $("#mydiv").html();
var regex = /<br\s*[\/]?>/gi;
$("#mydiv").html(str.replace(regex, "\n"));
Posted by: Guest on July-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language