JSFiddle - React, Tailwind, and code Playground

by mpsingh2003

HTML

<div contenteditable='true'>
    <div>I am contenteditable directly true</div>
    <div contenteditable='false'>
        <div contenteditable='true'>
            <div>I am contenteditable true with parent false</div>
            <div>I am contenteditable true with parent false</div>
        </div>
    </div>
</div>

CSS

div[contenteditable='false'] {
    margin-top:20px;
}

JavaScript

$("div[contenteditable='true']").mousedown(function(e){
   $(this).focus();
    e.stopPropagation();
})