Index: /CKEditor/branches/prototype/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/selection/plugin.js	(revision 2879)
+++ /CKEditor/branches/prototype/_source/plugins/selection/plugin.js	(revision 2880)
@@ -397,11 +397,11 @@
 						// CKEDITOR.dom.range instances.
 
-						var range = new CKEDITOR.dom.range( this.document );
-
-						var sel = this.getNative();
-
-						if ( this.getType() == CKEDITOR.SELECTION_TEXT )
+						var sel = this.getNative(),
+							nativeRange = sel.createRange(),
+							type = this.getType();
+
+						if ( type == CKEDITOR.SELECTION_TEXT )
 						{
-							var nativeRange = sel.createRange();
+							var range = new CKEDITOR.dom.range( this.document );
 
 							var boundaryInfo = getBoundaryInformation( nativeRange, true );
@@ -410,7 +410,28 @@
 							boundaryInfo = getBoundaryInformation( nativeRange );
 							range.setEnd( new CKEDITOR.dom.node( boundaryInfo.container ), boundaryInfo.offset );
+
+							return ( this._.cache.ranges = [ range ] );
 						}
-
-						return ( this._.cache.ranges = [ range ] );
+						else if ( type == CKEDITOR.SELECTION_ELEMENT )
+						{
+							var retval = this._.cache.ranges = [];
+
+							for ( var i = 0 ; i < nativeRange.length ; i++ )
+							{
+								var element = nativeRange.item( i ),
+									parentElement = element.parentNode,
+									j = 0,
+									range = new CKEDITOR.dom.range( this.document );
+								for (; j < parentElement.childNodes.length && parentElement.childNodes[j] != element ; j++ );
+
+								range.setStart( new CKEDITOR.dom.node( parentElement ), j );
+								range.setEnd( new CKEDITOR.dom.node( parentElement ), j + 1 );
+								retval.push( range );
+							}
+
+							return retval;
+						}
+
+						return ( this._.cache.ranges = [] );
 					};
 				})()
