I am making a messaging app, and a user can reply to a message. He therefore arrives on the CKEditor editor; I managed to put the message he's replying to in the editor, but I can't seem to place the cursor at the start of the editor and move the message he's replying to a few lines further down. (like when replying to an email).
Here's my code :
CKEDITOR.on('instanceReady', function(e) {
e.editor.setData('Message to reply to');
var selection = e.editor.getSelection();
var range = e.editor.createRange();
range.moveToElementEditStart(range.root);
e.editor.getSelection().selectRanges([range]);
});
But it doesn't work...
Thank you.