0

I have a two toolbar in quill.

  1. Quill toolbar
  2. Custom toolbar

I need to put the image tool in the custom toolbar but the problem is that quill is only allowed the addHandler for its own toolbar so I need to open the quill image uploader programmatically when the user clicks on my image.

Is there any way to do it?

Thanks

1 Answers1

0

You can access the Quill toolbar with quill.getModule('toolbar') which will expose the format handlers. This will also work with custom handlers that you've added to the Quill toolbar.

// ... set up quill stuff

// get the quill toolbar
let toolbar = quill.getModule('toolbar')

// call the image handler
toolbar.handlers.image()
person_v1.32
  • 2,641
  • 1
  • 14
  • 27