0

I having a contenteditable div. I also have several events that when triggered send html to the div. I would like to be able to replace a selection, place at the cursor, or at the end of div if nothing selected and div doesn't currently have focus.

Also I would like the cursor to be placed after inserted html.

I found several of Tim Down's answers that almost do what I need. The only thing that they dont is the last "insert at the end of the text if nothing selected and div doesn't currently have focus."

It needs to be all major browsers and IE9+. We use Mootools if that helps but jQuery answers wont help (as much).

Here is one of his that seem closest.

https://stackoverflow.com/a/6691294

Thank you in advance!

Community
  • 1
  • 1
Brandon
  • 320
  • 1
  • 4
  • 13

0 Answers0