Insert text at cursor in a content editable div
- by nijikunai
I have a contenteditable div where I need to insert text at the caret position,
This can be done in IE by document.selection.createRange().text = "banana"
Is there a similar way of implementing this in Firefox/Chrome?
(I know a solution exists here , but it looks sorta clumsy)
Thank you!