Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo website fails to import Quill Markdown #30

Open
Betree opened this issue Oct 2, 2019 · 5 comments
Open

Demo website fails to import Quill Markdown #30

Betree opened this issue Oct 2, 2019 · 5 comments

Comments

@Betree
Copy link

Betree commented Oct 2, 2019

Hi there,

The demo website (https://patleeman.github.io/quill-markdown-shortcuts/) is failing to import Quill Markdown with the following message:

hr.js:3 Uncaught TypeError: Cannot read property 'import' of undefined
    at Object.<anonymous> (hr.js:3)
    at __webpack_require__ (bootstrap 20916322352f1adaeb92:19)
    at Object.<anonymous> (index.js:30)
    at __webpack_require__ (bootstrap 20916322352f1adaeb92:19)
    at bootstrap 20916322352f1adaeb92:62
    at bootstrap 20916322352f1adaeb92:62
    at webpackUniversalModuleDefinition (universalModuleDefinition:9)
    at universalModuleDefinition:10
quill.js:1974 quill Cannot import modules/markdownShortcuts. Are you sure it was registered?
debug @ quill.js:1974
quill.js:1974 quill Cannot load markdownShortcuts module. Are you sure you registered it?
debug @ quill.js:1974
quill.js:1974 quill Cannot import modules/markdownShortcuts. Are you sure it was registered?
debug @ quill.js:1974
quill.js:5451 Uncaught TypeError: moduleClass is not a constructor
    at SnowTheme.addModule (quill.js:5451)
    at SnowTheme.addModule (quill.js:6531)
    at quill.js:5443
    at Array.forEach (<anonymous>)
    at SnowTheme.init (quill.js:5441)
    at new Quill (quill.js:1100)
    at (index):103

Tested on Chrome and Firefox, Linux.

@petemcfarlane
Copy link

👍 and Safari fails too
Screenshot 2019-11-22 at 13 51 44

@ghost
Copy link

ghost commented Dec 4, 2019

i have same problem.
Screenshot from 2019-12-04 16-47-32

@xueqiliu
Copy link

I have same problem. Has anyone solved it ?

@petemcfarlane
Copy link

Not solved it, but the demo importing as a module works which you may find useful: https://patleeman.github.io/quill-markdown-shortcuts/module/

@amos-chen
Copy link

(function webpackUniversalModuleDefinition(root, factory) {
  if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("quill"));
	else if(typeof define === 'function' && define.amd)
		define(["quill"], factory);
	else if(typeof exports === 'object')
		exports["MarkdownShortcuts"] = factory(require("quill"));
	else
    root["MarkdownShortcuts"] = factory(root["quill"]);
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) {
return /******/ (function(modules) { // ### webpackBootstrap

It is because the quill is not import properly, change the word quill to Quill and it will work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants