After instantiating Raphael text like so
var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!");
how do I go about then modifying that text?
t.text = "test";
did not work for me.
You must use the .attr()
docs method to change the text of an existing text element
like this
t.attr('text','new text here');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With