JSFiddle - React, Tailwind, and code Playground
by Imabot
HTML
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-svg.js"></script>
\( e=mc^2 \)
JavaScript
try {
console.log (MathJax.mathml2svg("x_2 = y^3"));
}
catch {
alert ('An error occured while converting equation to SVG with MathJax.mathml2svg')
}