patleeman / quill-markdown-shortcuts

Quill.js module that converts markdown to rich text formatting while typing.
https://patleeman.github.io/quill-markdown-shortcuts/
140 stars 49 forks source link

import in angular project #20

Closed Eraldo closed 5 years ago

Eraldo commented 5 years ago

When trying to import the module in my project like this:

import * as MarkdownShortcuts from 'quill-markdown-shortcuts/src/index';
Quill.register('modules/markdownShortcuts', MarkdownShortcuts);

I get the following error:

Uncaught TypeError: Cannot assign to read only property 'exports' of object '[object Object]'
    at Module.<anonymous> (index.js:281)
    at Module../node_modules/quill-markdown-shortcuts/src/index.js (index.js:281)
    at __webpack_require__ (bootstrap:83)
    at Module../src/app/core/editor/editor.component.ts (main.js:2229)
    at __webpack_require__ (bootstrap:83)
    at Module../src/app/core/editor/editor.module.ts (editor.component.ts:32)
    at __webpack_require__ (bootstrap:83)
    at Module../src/app/core/text-modal/text-modal.module.ts (notification.service.ts:14)
    at __webpack_require__ (bootstrap:83)
    at Module../src/app/app.module.ts (app.component.ts:19)

Context: Angular project.

Any ideas?

mrowles commented 5 years ago

Any luck with this?

patleeman commented 5 years ago

Sorry for the delay. The latest release might fix the issue. If not please open a new issue. Thanks