JSFiddle - React, Tailwind, and code Playground
HTML
<textarea rows="15"></textarea>
JavaScript
(function(){
$('textarea').keyup(function(event) {
if (/(\r?\n){2}$/.test($(this).val())) {
alert('2 consecutive empty lines at the end!');
}
});
})();