JSFiddle - React, Tailwind, and code Playground

by stevea

HTML

<div id='box' contentEditable="TRUE">
    <img src="http://s20.postimg.org/fpitivjl9/Pelican.jpg" width=150px; />
    Here's some text for the box so we can see how text interacts with the image.
</div>

CSS

#box {
    width:400px;
    height:300px;
    border:1px solid black;
}
img#pelican {
    float:left;
}

JavaScript

$(function(){ 
    $(document).bind("dragstart", function(e) {
     if (e.target.nodeName.toUpperCase() == "IMG") {
         return false;
     }
    });
});