quill icon indicating copy to clipboard operation
quill copied to clipboard

Toolbar not loading within MeteorJS

Open softwaresicario opened this issue 6 years ago • 1 comments

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

  1. Create a new Meteor project.
  2. Include the code snippets in HTML and controller .js file.
  3. Execute the project and visit the page to see it in the browser.
  4. 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?

softwaresicario avatar Mar 30 '20 17:03 softwaresicario

Please ask on Stack Overflow

benbro avatar Jan 30 '24 23:01 benbro