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