title: Issues with drag and drop in CKEditor
body: <p>I'm writing a small notetaking webapp which uses CKEditor as a HTML editor. I've been able to integrate it well, with one exception - drag and drop functionality. It mostly works - but there are two quirks I haven't been able to solve despite trying a whole lot of different approaches.</p>
  
  <p>My requirements are simple - I drag any file into CKEditor from outside the app, upon which it should insert a simple anchor tag in the editable text with a local link to the file. Currently, I am implementing drag and drop in my own CKEditor plugin called filemanager:</p>
  
  <pre><code>CKEDITOR.plugins.add( 'filemanager', {
  init: function( editor ) {
  
      editor.on('contentDom', function(contentDom) { 
  
          //Runs upon dropping a file into the editor
          contentDom.editor.document.on('drop', function(e) {
  
              //prevents default behavior as long as it's an actual file drag and drop (if it's dragging text etc. inside the editor, keep default behavior)
              if(e.data.$.dataTransfer.files.length)
              {
                  e.data.preventDefault();
              }
  
              //Goes through all the dropped files and insert HTML with links
              for (var i = 0; i &lt; e.data.$.dataTransfer.files.length; ++i) {
                  CopyData(e.data.$.dataTransfer.files[i].path);
              }
          });
      });
  
      //Creates the link in the editor
      function CopyData(path, range)
      {
          //Link HTML
          var fileHTML;
  
          /* Code to parse the path into HTML to be inserted */
  
          editor.insertHtml(fileHTML);
  
      }
  
  }
  </code></pre>
  
  <p>});</p>
  
  <p>I have omitted most of the CopyData function as the formatting isn't relevant, but it generates a div such as this:</p>
  
  <pre><code>fileHTML = "&lt;a href=\""+path+"\" class=\"fileLink\" target=\"_blank\"&gt;"+fileName+"&lt;/a&gt;";
  </code></pre>
  
  <p><br></p>
  
  <p>This does work perfectly fine, so the basic implementation of the feature seems to work. However, here are my two issues:</p>
  
  <ol>
  <li>Dropping a file into the editor but outside the actual text area (such as below the final line of text in the editor) does not disable default behavior. How can I run a preventDefault() for this area of the editor? Been trying events in all sort of places without results.</li>
  <li>The HTML isn't inserted at the location of the mouse cursor, even though CKEditor previews a caret there. Rather, it is inserted where the caret currently is in the document, independently of where you drop. This disrupts core functionality of the feature - is there a way to insert HTML at the mouse position? I would assume so since CKEditor actually previews a caret where the mouse is, but I looked through the documentation without results.</li>
  </ol>
  
  <p>Does anyone have ideas of how to solve the two above issues? If it helps, I am using nw.js so the webapp will always run in Chromium. Grateful for any responses!</p>