JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<style>
#container {position:relative; width: 300px; height: 300px; border:1px solid red;}
#divId{width:100px; height:100px; background:#f5f5f5;}
</style>
<div id="container">
</div>
<button>div</button>
<script>
$("button").click(function() {
var elm = $('<div id="divId"><span contenteditable="false">adfadsfadsf</span></div>');
elm.appendTo('#container');
});
$("span").live('dblclick', function(){
$("#divId span").attr('contenteditable','true').focus();
});
</script>