Hallo Arne ,
ich hab nl2br(
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text)
ausprobiert, aber es wird nichts ausgegeben, also insgesamt hab ich
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div><script>
document.write ('Hallo Welt. <br> ');
document.write ('Welcome to this site!');
str.replace(/\n|\r/g, "<br>");
htmlstring = stringContainingNewLines.replace(/(\r\n|\n|\r)/gm, "<br>");
nl2br( text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text);
</script></div>
</body>
</html>