Long block of text in Jade textarea?

Connor picture Connor · May 18, 2012 · Viewed 15k times · Source

I'm using Jade in my latest node.js app. I'd like to have a long block of text in a textarea by default.

If I do something like this:

textarea(id="theTextarea")

it renders just fine:

<textarea id="theTextarea"></textarea>

However, if I do something like so:

textarea(id="theTextarea")
  Hello world.

I get this:

<textarea id="theTextarea">
  <hello>world</hello>
</textarea>

But I'd like it to be like so:

<textarea id="theTextarea">
  hello, world
</textarea>

Any ideas?

Answer

Pickels picture Pickels · May 19, 2012
textarea(id="theTextarea")
  | Hello 
  | world.
  | Hello
  | moon.
  | Hello
  | sun.