I want to make a simple thinge. Just a text with underline line like tag in html. How can i do it in Raphael JS?
Here is a function that should do what you're after:
function underlineText(textElement) {
    var textBBox = textElement.getBBox();
var textUnderline = canvas.path("M"+textBBox.x+" "+(textBBox.y+textBBox.height)+"L"+(textBBox.x+textBBox.width)+" "+(textBBox.y+textBBox.height));  
}
var textElement = canvas.text(100,100,"hello world");
underlineText(textElement);
                        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