JSFiddle - React, Tailwind, and code Playground

by ricardolohmann

HTML

<textarea></textarea>

JavaScript

$(document).on('keyup', 'textarea', function(e) {
    if(e.ctrlKey && (e.which == 13 || e.keyCode == 13)) {
        $(this).val(function(i, val) {
            return val + '\n';
        });
    }
});