0.2.8 • Published 27 days ago

@writergate/quill-image-uploader-nextjs v0.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

Quill ImageHandler Module for NextJS

A modifed alternative of Quill Image Upload Plugin to support NextJS

The original plugin uses css import in node_modules, which is not supported by the latest NextJS.

Credits

The full credit for the editor plugin goes to Quill Image Upload Plugin and this is a modificaion to support the NextJS.

Therefore, keep upto date on its issue tracker whether the issue is fixed.

Install

Install with npm:

npm install @writergate/quill-image-uploader-nextjs --save

Webpack/ES6

import Quill from "quill";
import ImageUploader from "quill.imageUploader.js";
import '@writergate/quill-image-uploader-nextjs/dist/quill.imageUploader.min.css';

Quill.register("modules/imageUploader", ImageUploader);

const quill = new Quill(editor, {
  // ...
  modules: {
    // ...
    imageUploader: {
      upload: (file) => {
        return new Promise((resolve, reject) => {
          setTimeout(() => {
            resolve(
              "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/JavaScript-logo.png/480px-JavaScript-logo.png"
            );
          }, 3500);
        });
      },
    },
  },
});

Note: It's also important that you create a quill component and dynamically import the component with SSR: false for NextJS.

e.g: No SSR Editor component includes all the above code.

const QuillNoSSR = dynamic(
  () => import('src/components/no-ssr-editor').then(md => md.default),
  { ssr: false }
);
0.2.7

27 days ago

0.2.6

27 days ago

0.2.8

27 days ago

0.2.5

27 days ago

0.1.10

10 months ago

0.1.11

10 months ago

0.1.12

10 months ago

0.1.13

10 months ago

0.1.14

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.9

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.4

10 months ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago