JSFiddle - React, Tailwind, and code Playground

HTML

<div id="canvas" style="width:500px; height:300px; outline: 1px solid #000;"></div>

JavaScript

var canvas, font, text;
        
canvas = new Raphael(document.getElementById("canvas", 500, 300));
font = canvas.getFont("Arial");
text = canvas.print(0, 0, "Some text", font, 24).attr({ "fill": "#C00" });