I have a contenteditable div where I need to append div(child) at the caret position?
I successfully added text at caret position using some sample in the stack. But i didn't find a way to append a div at the caret position.
How to do it?
var appendText = "<div class='ui-state-default' contenteditable='false'>
<span>"+ui.draggable.text()+"</span>
<span class='ebAppendFieldClose'>x</span>
</div>"
$("#ebPlaceholder").append(appendText);
Right now i use the normal method (like this).