$(document).on('focus', '[contenteditable="true"]', function(){
var r = document.createRange();
r.selectNode(this);
document.getSelection().addRange(r);
});
$(document).on('focus', '[contenteditable="true"]', function(){
var r = document.createRange();
r.selectNode(this);
document.getSelection().addRange(r);
});