Disable New Line in Textarea when Pressed ENTER

Picture of Woocoders
Woocoders
2nd September 2020
<script>
$(document).ready(function(){
$("textarea").keydown(function(e){
if (e.keyCode == 13 && !e.shiftKey)
{
  // prevent default behavior
  e.preventDefault();
  //alert("ok");
  return false;
  }
});
});
</script>

Share this post: