JSFiddle - React, Tailwind, and code Playground
HTML
dont select this
<div class="document">click here and then click ctrl+a</div>
neither this.
CSS
.document {
height: 130px;
width: 400px;
border: 1px solid #CCCCCC;
}
JavaScript
$(window).bind('keydown', function(e) {
if(event.ctrlKey && event.keyCode == 65) {
var self = $('.document').attr('contenteditable', '');
window.setTimeout(function() {
self.removeAttr('contenteditable');
}, 20);
}
});