1 | # Quill ImageDrop Module
|
2 |
|
3 | A module for Quill rich text editor to allow images to be pasted and drag/dropped into the editor.
|
4 |
|
5 | ## Demo
|
6 |
|
7 | [Plunker](https://plnkr.co/edit/ubVmPkBjqQESsefM3JrT?p=preview)
|
8 |
|
9 | ## Usage
|
10 |
|
11 | ### Webpack/ES6
|
12 |
|
13 | ```javascript
|
14 | import Quill from 'quill';
|
15 | import { ImageDrop } from 'quill-image-drop-module';
|
16 |
|
17 | Quill.register('modules/imageDrop', ImageDrop);
|
18 |
|
19 | const quill = new Quill(editor, {
|
20 | // ...
|
21 | modules: {
|
22 | // ...
|
23 | imageDrop: true
|
24 | }
|
25 | });
|
26 | ```
|
27 |
|
28 | ### Script Tag
|
29 |
|
30 | Copy image-drop.min.js into your web root or include from node_modules
|
31 |
|
32 | ```html
|
33 | <script src="/node_modules/quill-image-drop-module/image-drop.min.js"></script>
|
34 | ```
|
35 |
|
36 | ```javascript
|
37 | var quill = new Quill(editor, {
|
38 | // ...
|
39 | modules: {
|
40 | // ...
|
41 | imageDrop: true
|
42 | }
|
43 | });
|
44 | ``` |
\ | No newline at end of file |