Hi,
I'm trying to select all of the editor's contents when it get's the focus. For starters I tried to select an Element (which I can be sure of is the only element in the editor, so selecting it would do the job as well) on focus, but I can't seem to get it right. I tried
...and various other variants of selectElement() but none seems to work, the method's not even found. So if this is the right method, how do I call it? Or is there a method that selects all contents?
Thanks,
Lukas
I'm trying to select all of the editor's contents when it get's the focus. For starters I tried to select an Element (which I can be sure of is the only element in the editor, so selecting it would do the job as well) on focus, but I can't seem to get it right. I tried
rbCKEditor.on('focus', function() {
if(element = this.document.getById( 'edit_note' )) {
console.log(element) // The element exists, this log is being called
this.dom.selection.selectElement(element);
}
});...and various other variants of selectElement() but none seems to work, the method's not even found. So if this is the right method, how do I call it? Or is there a method that selects all contents?
Thanks,
Lukas

Re: How do you make a selection in CKEditor?
this.rbCKEditor.on('focus', function() { var editor = this; setTimeout( function() { var sel = editor.getSelection(), element = sel.getStartElement(); sel.selectElement(element); }, 0.5 ); });getStartElement is always the body element when focus is fired