Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

A module for Quill rich text editor to allow images' URLs to be drag/dropped into the editor.

Notifications You must be signed in to change notification settings

riencroonenborghs/quill-image-url-drop-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quill Image URL Drop Module

A module for Quill rich text editor to allow images' URLs to be drag/dropped into the editor.

Usage

Script Tag

Copy quill-image-url-drop.js into your web root

<script src="quill-image-url-drop-module.js"></script>

Javascript

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"
      }
    }
});

HTML

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>

About

A module for Quill rich text editor to allow images' URLs to be drag/dropped into the editor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published