# quill-image-paste **Repository Path**: wiir/quill-image-paste ## Basic Information - **Project Name**: quill-image-paste - **Description**: A module for quill editor to allow paste image - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-31 - **Last Updated**: 2021-03-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Quill ImagePaste Module A module for Quill editor to allow paste image. ## Demo [CodePen](https://codepen.io/liangcy/pen/oqVYGe) ## Usage ```html ``` ```javascript var quill = new Quill(editor, { // ... modules: { // ... imagePaste: { // options } } }); ``` ### options Pass an empty object, paste image as base64 ```javascript var quill = new Quill(editor, { // ... modules: { // ... imagePaste: {} } }); ``` You can also use `addImageBlob` option to upload image to server ```javascript const quill = new Quill(editor, { // ... modules: { // ... imagePaste: { addImageBlob: function (blob, callback) { var formData = new FormData() formData.append('image', blob) // your upload function, get the uploaded image url, add then callback(imageUrl) } } } }); ```