title: Insert link in contenteditable element
body: <p>I'm working on a simple blog system and I'm using contenteditable so that users can format the text.</p>
  
  <p>Up to now everything works like a charm.</p>
  
  <p>Next thing i want is that users can add a hyperlink in the text.</p>
  
  <p>The user have to select (part of) the text and click on the link button. After that a popup opens where users should enter the link address.</p>
  
  <p>When the user clicks on the accept button I want to add the link to the text they selected in the contenteditable.</p>
  
  <p>How can I implement this functionality, since I have no clue how to do this?</p>
  
  <p>My site: <a href="http://82.170.147.49/blog/3/alpha-release" rel="noreferrer">http://82.170.147.49/blog/3/alpha-release</a></p>
  
  <p>jsFiddle of my site: <a href="http://jsfiddle.net/qhN9j/" rel="noreferrer">http://jsfiddle.net/qhN9j/</a></p>