0.2.8 • Published 1 year ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.2.6

1 year ago

0.2.8

1 year ago

0.2.5

1 year ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago