0

I have a quill editor added to my component. I need to upload the images to a server instead of encoding them in base64. So I'm thinking of an event fired when an image is added with the base64 encoding as input, and send this input to a BE HTTP request that saves it on a server. The BE sends me the URL for the image and I replace it in the quill editor.

I have tried to add an imageHandler but the select file window is not displayed anymore.

  public getEditorInstance(editorInstance:any) {
    console.log(editorInstance)
    let toolbar = editorInstance.getModule('toolbar');
    toolbar.addHandler('image', this.showImageUI);
  }

  public showImageUI(image: any) {
    console.log('image')
  }

How can I implement this?

user2004
  • 1,783
  • 4
  • 15
  • 42

0 Answers0