JSFiddle - React, Tailwind, and code Playground

by chridam

HTML

<div contenteditable="true" class="draggable" >
    <input type="text" value="drag me!"/>
</div>

CSS

.draggable{height:500px;width:500px;background:blue;}

JavaScript

$(".draggable").draggable()
  .click(function() {
    $(this).draggable( {disabled: false});
}).dblclick(function() {
    $(this).draggable({ disabled: true });
});