I have a custom image selector for FCKeditor 2.6.5. Everything works fine on Firefox, Chrome and Safari. But in the IE6 I get a strange type for the selection. The code for this is:
alert(editorInstance.Selection.GetType());
And it returns 'Control'.
What is this type and how could I access the HTML of the selection instead?
This means the selection is a ControlRange as opposed to a TextRange. A ControlRange is pretty much a collection of elements that you can call commands on via its execCommand()
method and select via its select()
method. You get a ControlRange from the selection object in IE when you're in an editable document or element and one or more elements such as images are selected.