quill-upload-image
v1.5.2
Published
A module for Quill rich text editor to allow images to be uploaded to a server instead of being base64 encoded
Downloads
129
Readme
Quill Upload Image
Upload images in Quill through a server instead of being base64 encoded. Handles drag & drop, pasting, and direct uploads.
import Quill from 'quill'
import UploadImage from 'quill-upload-image'
Quill.register('modules/uploadImage', UploadImage)
const quill = new Quill(editor, {
modules: {
uploadImage: {
upload: file =>
new Promise((resolve, reject) => {
setTimeout(() => {
resolve('https://example.com/image.png')
}, 3000)
}),
onError: error => console.error(error)
}
}
})