kensnyder / quill-image-drop-module

A module for Quill rich text editor to allow images to be pasted and drag/dropped into the editor.
214 stars 78 forks source link

Own handle function #17

Closed Smip closed 5 years ago

Smip commented 6 years ago

I added ability to use own handle function.

I use this feature for upload images to server.

   modules = {
      imageDrop: {
           handler: this.upload.bind(this)
      }
    };

  upload(file, callback){
    const fb = new FormData();
    fb.append('file', file, file.name);
    this.filesService.addFile(fb).subscribe(event => {
      callback(event['response']);
    });
  }
ariefurtado commented 6 years ago

Can u generate a rc with this ??? I really need it :D

Smip commented 6 years ago

@ariefurtado Sorry, what do you mean by rc?

stargazing-dino commented 5 years ago

@kensnyder Any reason this hasn't been merged? It'd really help me at the moment

kensnyder commented 5 years ago

@Nolence I'm closing this PR in favor of a slightly different one. See PR #22. Please review and let me know if it will work for you before I merge it.