title: Replacing selected with another text
body: <p>I am trying to replace selected text with another text.<br>
  Consider following is the line of text.</p>
  
  <blockquote>
    <p>Hello world.Good morning. Hello world. Good morning.</p>
  </blockquote>
  
  <p>Here if I select second <code>morning</code> text and I want replace morning text with night. So that output need to look like this:</p>
  
  <blockquote>
    <p>Hello world.Good morning. Hello world. Good night.</p>
  </blockquote>
  
  <p>I tried replace function, but it is replacing first morning text.<br>
  Can anyone suggest solution for this?</p>