+ if(ranges.length === 1) {
+ var start = ranges[0].startContainer;
+ var end = ranges[0].endContainer;
+ if(start.$ !== end.$) {
+ // selection is a fragment that need to be wrapped in container to apply style
+ element = new CKEDITOR.dom.element('div');
+ element.append(ranges[0].cloneContents());
+ this.editor.insertElement(element);
+ }
+ }