code: function pasteImageData(e, rng) {
          var dataTransfer = e.clipboardData || e.dataTransfer;
  
          function processItems(items) {
            var i, item, reader, hadImage = false;
  
            if (items) {
              for (i = 0; i < items.length; i++) {
                item = items[i];
  
                if (/^image\/(jpeg|png|gif|bmp)$/.test(item.type)) {
                  var blob = item.getAsFile ? item.getAsFile() : item;
  
                  reader = new FileReader();
                  reader.onload = pasteImage.bind(null, rng, reader, blob);
                  reader.readAsDataURL(blob);
  
                  e.preventDefault();
                  hadImage = true;
                }
              }
            }
  
            return hadImage;
          }
  
          if (editor.settings.paste_data_images && dataTransfer) {
            return processItems(dataTransfer.items) || processItems(dataTransfer.files);
          }
        }
docs: Checks if the clipboard contains image data if it does it will take that data
  and convert it into a data url image and paste that image at the caret location.
  
  @param  {ClipboardEvent} e Paste/drop event object.
  @param  {DOMRange} rng Rng object to move selection to.
  @return {Boolean} true/false if the image data was found or not.