After messing around a bit, I need it to work with the following code:
$(document).ready(function() { CKEDITOR.on('instanceReady', function(ev) { ev.editor.focus(); var s = ev.editor.getSelection();
Idea:
- Get root node (not body)
- Continue to the next node until there are no more nodes to go to.
- Select the last node.
- Collapse it
- Setting range
source share