A module for Quill rich text editor to allow images' URLs to be drag/dropped into the editor.
Copy quill-image-url-drop.js into your web root
<script src="quill-image-url-drop-module.js"></script>
Register the module
Quill.register("modules/imageUrlDrop", QuillImageUrlDrop);
Specify the container that holds the images you want to drag/drop.
var quill = new Quill(editor, {
// ...
modules: {
// ...
imageUrlDrop: {
container: ".some-container-holding-the-images-you-want-to-use"
}
}
});
Add the container with the class specified in your JS.
Each image should have a data-url
attribute containing the image's URL.
<div class="some-container-holding-the-images-you-want-to-use">
<img src="<URL>" data-url="<URL>" />
</div>