React-quill: how to add handlers to when using with quill 1.0

Created on 16 Nov 2016  路  1Comment  路  Source: zenoamaro/react-quill

I am trying to add handler to image there is no documentation on how to do it. I am new to this can anyone help me with this?

Most helpful comment

this code solved the issue

this._quillModules = {
           toolbar: {
               container: [

                   ['bold', 'italic', 'underline', 'strike', 'blockquote'],
                   [{'list': 'ordered'}, {'list': 'bullet'}, {'indent': '-1'}, {'indent': '+1'}],
                   ['link', 'image'],
                   ['clean']
               ],
               handlers: {
                   // handlers object will be merged with default handlers object
                   'image': this.imageHandler
               }
               /* ... other modules */
           }
       }

>All comments

this code solved the issue

this._quillModules = {
           toolbar: {
               container: [

                   ['bold', 'italic', 'underline', 'strike', 'blockquote'],
                   [{'list': 'ordered'}, {'list': 'bullet'}, {'indent': '-1'}, {'indent': '+1'}],
                   ['link', 'image'],
                   ['clean']
               ],
               handlers: {
                   // handlers object will be merged with default handlers object
                   'image': this.imageHandler
               }
               /* ... other modules */
           }
       }
Was this page helpful?
0 / 5 - 0 ratings