user3142695 user3142695 - 3 months ago 63x
HTML Question

Add line break in textarea in a jade template

I need to output an array content in a textarea in a jade template. It is something simple like this:

each content

But I need to add a linebreak after each element, as I want to display each element in a own line in the textarea. How do I add the linebreak?


In JADE you can use expressions like \n, \s or \t in "Unescaped Buffered Code". Take a look into the Docs:

Here is an example Pen:

- var contents = {'line1': 'abcd\n', 'line2':'defg\n'}
   each content in contents