title: Replace selected content in the ckEditor with new content using javascript
body: <p>I am using CKEditor ver.3.6 in my MVC Application.</p>
  
  <p>My requirement is to update the selected text with new text in the ckEditor. I could find out the method editor.getSelection().getSelectedText();  for getting selected text from the editor. I need to add some tag with the selected text when a toolbar button is pressed and update the selected content using javascript.</p>
  
  <p>For Example :</p>
  
  <p>Content in the ckEditor is  </p>
  
  <pre>
   &lt;span&gt;Edit content in the editor&lt;/span&gt;
  </pre>
  
  <p>and I have selected the word “editor” from ckEditor. I have to update the selected word “editor” with “ckEditor” using javascript code.</p>
  
  <p>Please suggest a proper solution.</p>