JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <body>
        <form action="MyInserts.php">
        <textarea onkeydown="pressed(event)"></textarea>
        </form>
    </body>
</html>

JavaScript

function pressed(e) {
    if ( (window.event ? event.keyCode : e.which) == 13) { 
        document.forms[0].submit() 
    }
}