1

I have an application that creates several hundreds of inline CKEditor instances on the same page and it is too slow to create them all at once. I want to create an editor when the user clicks a contenteditable element, like this:

$("#editor").click(function()
{
    CKEDITOR.inline("editor");
});

Example fiddle: https://jsfiddle.net/adrianrosca/m3dtvcku/4/

But when I click in the middle of the text, the cursor will jump to the beginning of the content and that's not a good behaviour.

Is there a way to get the cursor to stay put or is there another way to create/destroy lots and lots of inline editors.

Adrian Rosca
  • 6,922
  • 9
  • 40
  • 57
  • I found this on how to get the cursor: http://stackoverflow.com/questions/263743/caret-position-in-textarea-in-characters-from-the-start – Bindrid Jan 03 '16 at 04:59
  • http://stackoverflow.com/questions/4536532/how-to-set-cursor-position-to-end-of-text-in-ckeditor to set the cursor in editor – Bindrid Jan 03 '16 at 05:01

0 Answers0