This is second part of the tutorial about getting started with Raphael.js. To see this first part go here.
Writing Text with Raphael
Some code first ;)
var canvas = Raphael(0, 0, 250, 250 );
var t1 = canvas.text(50, 50, *"Some text Goes here"*);
var t2 = canvas.text(60,90,"First line \n Second Line \n Third line");
var t3 = canvas.text(214, 140, "1079").attr({"text-anchor":"middle",'font-size':16,"font-family":"arial","fill":"#fff"});
In the above examples canvas.text will create a simple text element at 50,50. Strangely VML /SVG do not have Line breaks therefore the programmer is responsible for creating new lines,in most cases appending** ‘\n’** does the trick.