Possible Duplicate:
CKEditor - Set cursor position to end of text
I have a <div>
with a lot of content. After a click on this div, the CKEditor is loaded to edit this div.
Now I would like to set the caret/cursor to the end of the contents after replacing it with the editor.
My code currently is something like this:
var editor = CKEDITOR.replace('content', {
// Settings
// Event listeners
on: {
instanceReady: function(evt) {
var editor = evt.editor;
// give focus (displays caret at the beginning of the content, not the end)
editor.focus();
}
}
});

– Abela Feb 27 '14 at 14:01