title: Ckeditor selected html not working correct with chrome browser
body: <p>Iam working in an mvc application and using ckeditor 3.6.2 version. I have used the following code for getting selected html from ckeditor.</p>
  
  <pre><code>CKEDITOR.editor.prototype.getSelectedHtml = function () {
  
      if (CKEDITOR.env.ie) {
          this.focus();
          selection = this.getSelection();
      } else {
          selection = this.getSelection();
      }
      if (selection) {
          var bookmarks = selection.createBookmarks(),
       range = selection.getRanges()[0],
       fragment = range.clone().cloneContents();
  
          selection.selectBookmarks(bookmarks);
  
          var retval = "",
       childList = fragment.getChildren(),
       childCount = childList.count();
          for (var i = 0; i &lt; childCount; i++) {
              var child = childList.getItem(i);
              console.log(child);
              retval += (child.getOuterHtml ?
          child.getOuterHtml() : child.getText());
          }
          return retval;
      }
  };
  </code></pre>
  
  <p>I have an issue in chrome browser when I selected a text and call CKEDITOR.instances.editor1.getSelectedHtml(). </p>
  
  <p>For example, suppose in my editor there is a content &lt;span style="color:red;">Welcome Note&lt;/span>. If I selected "Welcome Note" and call getSelectedHtml() method firefox,safari,IE8 returns "Welcome Note" with span tag, but chrome returns only the text "Welcome Note". If Iam trying to replace the selected content using CKEDITOR.instances.editor1.insertHtml("&lt;div style='font-size:12px'>"+ CKEDITOR.instances.editor1.getSelectedHtml()+"&lt;/div>"), in chrome I lost the font color since getSelectedHtml() returns only the selected text. But this works fine with other browsers.</p>
  
  <blockquote>
    <p>Note : If the content is "Welcome &lt;span
    style="color:red;">Note&lt;/span>" and the selected word is "Welcome
    Note". In this case,this will be correct in chrome and other browsers.</p>
  </blockquote>
  
  <p>Please suggest a proper solution.</p>