JSFiddle - React, Tailwind, and code Playground

by dshilkret

HTML

<h1>Hello World</h1>

<textarea>Click the button to add a class attribute with the value of "democlass" to the h1 element.</textarea>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.getElementsByTagName("textarea")[0].setAttribute("spellcheck", "true"); 
}
</script>