JSFiddle - React, Tailwind, and code Playground
HTML
<div id="all">
<h1>Welcome to the awesome chat system.</h1>
<input type="text" id="name"><br/>
<textarea rows='30' id="chatArea" disabled='true'>
</textarea>
<textarea id="writtenThing" onkeyup="keyfunction(event)"></textarea>
<button id="send">Send</button>
</div>
JavaScript
function keyfunction(e)
{
if(e.keyCode == 13 || e.which == 13)
{
alert("things to do...");
}
}