I use dropzone as an image downloader. I added a button under each image so that when I click the image will be inserted at the cursor position in CKEditor. See the example below:
myDropzone.on("addedfile", function(file) { // Hookup image insert button file.previewElement.querySelector('.insert').onclick = function() { var element = CKEDITOR.dom.element.createFromHtml('<img src="' + $SCRIPT_ROOT + '/api/files/' + file.id + '?filter=image"/>'); CKEDITOR.instances.body.insertElement(element); }; });
spitz
source share