quill-markdown-shortcuts icon indicating copy to clipboard operation
quill-markdown-shortcuts copied to clipboard

Demo website fails to import Quill Markdown

Open Betree opened this issue 5 years ago • 5 comments

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.

Betree avatar Oct 02 '19 09:10 Betree

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

petemcfarlane avatar Nov 22 '19 13:11 petemcfarlane

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

ghost avatar Dec 04 '19 14:12 ghost

I have same problem. Has anyone solved it ?

xueqiliu avatar Dec 30 '19 03:12 xueqiliu

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

petemcfarlane avatar Dec 30 '19 08:12 petemcfarlane

(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!

amos-chen avatar Apr 21 '20 02:04 amos-chen