question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How To Use Custom Quill Modules - both ways result in error

See original GitHub issue

Hi,

Following the README > How To Use Custom Quill Modules gives

Uncaught TypeError: Cannot read property 'imports' of undefined
    at Object.eval (image-resize.min.js?f318:1)

Found this issue reported in quill too. A solution mentioned there was to add this to webpack config:

new webpack.ProvidePlugin({
    'window.Quill': 'quill'
  })

Is this really required? If so, how to add it to vue.config.js?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
papalardocommented, May 27, 2020

I had the some problem.

Try import image-resize from quill-image-resize-vue

Note: quill-image-resize-vue

import ImageResize from 'quill-image-resize-vue'
import { ImageDrop } from "quill-image-drop-module";
export default {
    components: {
        VueEditor
    },
    data: () => ({
        customModulesForEditor: [
            { alias: "imageDrop", module: ImageDrop }, 
            { alias: "imageResize", module: ImageResize }
        ],
        editorSettings: {
          modules: {
            imageDrop: true,
            imageResize: {}
          }
        }
    })
}

1reaction
rafaelgrubecommented, Dec 23, 2020

Hi,

Following the README > How To Use Custom Quill Modules gives

Uncaught TypeError: Cannot read property 'imports' of undefined
    at Object.eval (image-resize.min.js?f318:1)

Found this issue reported in quill too. A solution mentioned there was to add this to webpack config:

new webpack.ProvidePlugin({
    'window.Quill': 'quill'
  })

Is this really required? If so, how to add it to vue.config.js?

Same problem here. I can’t used the custom modules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: The given range isn't in document #1940 - quilljs/quill
Click into the text area to focus the editor. Select all text with Ctrl-A . Remove selected text with Del . The document...
Read more >
Trying to initialize Quill with specific formats and getting an error
If I comment out the format key, it works. @editor = new Quill(@find('.quill-editor'), formats: ['bold'] modules: placeholder: text: "Enter Text ...
Read more >
How to use the quill.register function in quill - Snyk
Define custom inline blot for find highlighting const Inline = Quill.import('blots/inline'); class HighlightBlot extends Inline {} HighlightBlot.
Read more >
Building a Custom Module - Quill Rich Text Editor
For the purpose of this guide, we will walk through one way to build a word counter module, a commonly found feature in...
Read more >
Quill
quill example ... Quotations are both compile-time and runtime values. Quill ... It's possible to override this default behavior using a custom schema...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found