JSFiddle - React, Tailwind, and code Playground

by agustinmorelle

HTML

<textarea id="myText">
    Lorem ipsum...
</textarea>
<button id="test">Send</button>

JavaScript

function sendMail() {
    var link = "mailto:[email protected]"+ "&subject=" + escape("This is my subject")+ "&body=" + escape(document.getElementById('myText').value);

    window.location.href = link;
}

$('#test').on("click",function(){
sendMail();
})