quill-mention / quill-mention

💬 @mentions for the Quill rich text editor
https://quill-mention.com/
MIT License
755 stars 273 forks source link

quill Cannot import modules/mention. Are you sure it was registered? #363

Closed oitzhakov closed 6 months ago

oitzhakov commented 8 months ago

In my angular app i upgrade to "quill": "2.0.0-rc.2", and i get this error

modules = { mention: { allowedChars: /^[A-Za-z\sÅÄÖåäö]*$/, onSelect: (item, insertItem) => { const editor = this.editor.quillEditor; insertItem(item); // necessary because quill-mention triggers changes as 'api' instead of 'user' editor.insertText(editor.getLength() - 1, '', 'user'); }, dataAttributes: ['_id'], positioningStrategy: 'fixed', source: (searchTerm, renderList) => { const values = this.mentionList; if (searchTerm.length === 0) { renderList(values, searchTerm); } else { const matches = []; values.forEach((entry) => { if (entry.value.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1) { matches.push(entry); } }); renderList(matches, searchTerm); } }, }, toolbar: [], };

Errors: quill Cannot import modules/Mention. Are you sure it was registered? quill Cannot load Mention module. Are you sure you registered it? quill Cannot import modules/Mention. Are you sure it was registered? Uncaught TypeError: ModuleClass is not a constructor

csculley commented 8 months ago

This seems like a duplicate of #362, quill-mentions currently doesn't support any of the 2.0.0 rcs