I got this little html -:
The new lines are preserved, but not converted to HTML new lines (<BR/>), so they are ignored.
<BR/>
You can convert them to <BR/> with .replace:
.replace
$("#copyToDiv").on("click",function(){ $("#viewOne").html( $("#viewTwo").val().replace("\n","<br/>") ) });