JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<textarea>
  
</textarea>

CSS

textarea{
  height:250px;
  width:100%;
}

JavaScript

$("textarea").keydown(function(e) {
    if(e.keyCode === 9) { 
        var start = this.selectionStart;
            end = this.selectionEnd;

        var $this = $(this);

        $this.val($this.val().substring(0, start)
                    + "\t"
                    + $this.val().substring(end));

        this.selectionStart = this.selectionEnd = start + 1;

        return false;
    }
});