New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

quill-drag-and-drop-module

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quill-drag-and-drop-module

Quill module to add drag-and-drop support to the Quill container

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
314
decreased by-10.03%
Maintainers
1
Weekly downloads
 
Created
Source

Quill Drag-and-Drop Module

Quill module to add drag-and-drop support to the Quill container

Installation

The quill drag-and-drop module is available as a Bower package and as an npm package.

To install with Bower:

bower install quill-drag-and-drop-module

Or, to install with npm:

npm install --save quill-drag-and-drop-module

Usage

It is expected that either:

  • Quill is globally accessible, or
  • "quill" is requirable via CommonJS or AMD

Instantiate a new Quill like so:

const Quill = require('quill');
const DragAndDropModule = require('quill-drag-and-drop-module');
...
const quill = new Quill('#basic-wrapper .editor-container', {
  modules: {
    toolbar: {
      container: '#basic-toolbar'
    },
    dragAndDrop: {
      draggables: [
        {
          content_type_pattern: DragAndDropModule.image_content_type_pattern,
          tag: 'img',
          attr: 'src'
        },
      ],
      onDrop(file) {
        return DragAndDropModule.utils.getFileDataUrl(file)
        .then(base64 => {...})
        .then(response_from_server => response_from_server.url_of_resource);
      }
    }
  }
});

See the examples for more details.

Building

To build quill-drag-and-drop-module from the ECMAScript2015 source, do the following in a Node.js enabled environment:

npm install
npm run compile

License

The quill drag-and-drop module is released under the MIT License. Please see the LICENSE file for details.

Keywords

FAQs

Package last updated on 22 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc