How to make a new line in raphael JS text?

javascript, raphael

Solution

It works with `\n`, see a live demo on jsFiddle, illustrating this.

Also have a look at the Raphaël reference, here's a pullquote from the entry on `text()`:

Draws a text string. If you need line breaks, put “\n” in the string.

Problem

I was trying to use `<br> and \n` , but it seems not to work inside text in raphael js. I need it to be inside one text, because I am using multiple resize effects in different languages (one language has three lines and one 4 lines). My code that is not working: ``` var mytext = paper.text(150, 250, "Line1<br>Line2"); ```

Original source