title: Adding a target="_blank" with execCommand 'createlink'
body: <p>I am attempting to create a mini WYSIWYG editor for a custom CMS. It has the option to add and remove links. It adds links fine, but would like to have the option to add <code>target="_blank"</code> to the hyperlink. Also, if possible, I would like to be able to add <code>alt=""</code> and <code>title=""</code>.</p>
  
  <p>At the moment this is my code:</p>
  
  <pre><code>function addLink() {
      var linkURL = prompt('Enter a URL:', 'http://');
      editorWindow.document.execCommand('createlink', false, linkURL);
  }
  </code></pre>
  
  <p>Been looking around, and can't seem to find a solution. Most of the solutions I've seen say to add:</p>
  
  <pre><code>function addLink() {
      var linkURL = prompt('Enter a URL:', 'http://');
      var newLink = editorWindow.document.execCommand('createlink', false, linkURL);
      newLink.target = "_blank";
  }
  </code></pre>
  
  <p>But this doesn't seem to work. Any suggestions?</p>