quill
quill copied to clipboard
Toolbar not loading within MeteorJS
Following the tutorial at Quilljs.com and setting things up in a Meteor project, the toolbar did not load and kept throwing the following error on the console:
ERROR: container required for the toolbar
Context and sample code:
-
Installed through:
-
Relevant code snippet:
Installed through:
npm install [email protected]
HTML:
<div id="editor">
<p>Hello World!</p>
<p>Some initial <strong>bold</strong> text</p>
<p><br></p>
</div>
Controller:
import './quill.snow.css';
import Quill from 'quilljs';
[...]
quillEditor = new Quill('#theEditor', {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['image', 'code-block']
]
},
placeholder: 'Compose an epic...',
theme: 'snow' // or 'bubble'
});
Steps for Reproduction
- Create a new Meteor project.
- Include the code snippets in HTML and controller .js file.
- Execute the project and visit the page to see it in the browser.
- See the toolbar not appearing, go to the browser console to see the error stacktrace.
Expected behavior: Editor appearing with toolbar just as in the quickstart section on the website.
Actual behavior: Editor loads, toolbar doesn't.
Platforms:
Chrome 79, GNU Linux XUbuntu 16.04
Version: QuillJS 1.3.6
Same code loaded in a static page works properly.
Any clue what I am doing wrong?
Please ask on Stack Overflow