Quill ImageUpload Module
A module for Quill rich text editor to upload images to be selected from toolbar editor. This is a fork of https://github.com/fxmontigny/quill-image-upload and supports AWS S3 integration. Image files are saved to your-s3-bucket/quill-images.
Usage
Webpack/ES6
;; Quill; const quill = editor // ... modules: // ... imageUpload: url: '' // AWS Cloudfront URL. method: 'POST' // change query method, default 'POST' name: 'file' // custom form name withCredentials: false // withCredentials headers: {} // add custom headers, example { token: 'your-token'} csrf: token: 'token' hash: '' // add custom CSRF {} // add custom uploader // personalize successful callback and call next function to insert new url to the editor { ; } // personalize failed callback { ; } // optional // add callback when a image have been chosen { console; ; // go back to component and send to the server } ;
Script Tag
Copy image-upload.min.js into your web root or include from node_modules
var quill = editor // ... modules: // ... imageUpload: url: '' // server url. If the url is empty then the base64 returns method: 'POST' // change query method, default 'POST' name: 'image' // custom form name withCredentials: false // withCredentials headers: {} // add custom headers, example { token: 'your-token'} // personalize successful callback and call next function to insert new url to the editor { ; } // personalize failed callback { ; } ;