New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

quill-plugin-image-upload

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quill-plugin-image-upload

a plugin for uploading image in Quill

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

quill-plugin-image-upload

A plugin for uploading image in Quill 🌇

  • 🌟 upload a image when it is inserted, and then replace the base64-url with a http-url
  • 🌟 preview the image which is uploading with a loading animation
  • 🌟 when the image is uploading, we can keep editing the content including changing the image's position or even delete the image.

Install

npm install quill-plugin-image-upload --save

Start

import Quill from 'quill';
import 'quill/dist/quill.snow.css';
import imageUpload from 'quill-plugin-image-upload';

// register quill-plugin-image-upload
Quill.register('modules/imageUpload', imageUpload);

new Quill('#editor', {
  theme: 'snow',
  modules: {
    toolbar: [
     'image'
    ],
    imageUpload: {
      upload: file => {
        // return a Promise that resolves in a link to the uploaded image
        return new Promise((resolve, reject) => {
          ajax().then(data => resolve(data.imageUrl));
        });
      }
    },
  },
});

Demo

cd demo
npm install
npm start

Keywords

quill

FAQs

Package last updated on 29 Nov 2018

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