contenteditable example
HTML
<p type="text" id="source" contenteditable="true" >edit</p>
<div id="target">edit them</div>
JavaScript
(function () {
$('#source').focus(function(){
$(this).css("background-color","#cccccc");
});
$('#source').blur( function() {
$(this).css("background-color","#ffffff");
$('#target').html('<div id="target"> hey! </div>');
});
})();