JSFiddle - React, Tailwind, and code Playground

by bmh_ca

HTML

<textarea>This is some content. It wraps.</textarea>

CSS

textarea {
  width: 4cm;   
}

JavaScript

$("textarea").keydown(function (event) {
  cursor_position = this.startSelection;
  alert("On first line? ... ")
});