JSFiddle - React, Tailwind, and code Playground

HTML

<textarea rows="15">
    
</textarea>

JavaScript

(function(){
    var enters = 0;
    $('textarea').keypress(function(event) {
        console.log(event.which);
        if (event.which == 13)
            enters++;
        else
            enters = 0;
        if (enters > 1) {
            alert('You hit 2 new lines!');
        }
    });
})();