Answers for "html break at \n"

2

Line break in HTML with '\n'

white-space: pre-line;
Posted by: Guest on April-06-2020
0

how to read breakline \n in html

function xx (string){
  return string.replace(/(\r\n|\n|\r)/gm, "</br>");
}

console.log('Here's some text.\n It has some line breaks that will be removed \r using Javascript.\r\n');
Posted by: Guest on December-24-2021

Browse Popular Code Answers by Language