JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css">
<div id="editor" contentEditable="true"></div>

CSS

#editor {
    width:500px;
    height:170px;
    border: 1px solid gray;
}

JavaScript

$(document).ready(function() {

        var $editor    = $('#editor');
        var $clipboard = $('<textarea />').insertAfter($editor);
        
        if(!document.execCommand('StyleWithCSS', false, false)) {
                document.execCommand('UseCSS', false, true);
        }
        
        $editor.on('paste', function() {

                var $self = $(this);
                
                $clipboard.val('').focus();
            
                setTimeout(function() {
                    
                        $self.focus();
                        document.execCommand('insertHTML', false, $clipboard.val());
                        
                }, 100);

        });

});