I have a place where I am trying to show code in a text area. I have dumbed down the example but basically user can input some fields, click a button, and the code snippet
just use and add \n and space according to the needed layout
edit:
you can also write
var mySnippet = "\n\ \n\ \n\ ";