title: how to install Quill.js in Angular
body: <p>Sorry, my understanding of how packaging works in <code>Angular</code> is terrible!! I want to use a <code>WYSIWYG</code> editor in my <code>Angular6</code> application. I have zeroed down to <code>quill.js</code>. <a href="https://quilljs.com/docs/quickstart/" rel="nofollow noreferrer">https://quilljs.com/docs/quickstart/</a></p>
  
  <p>But I am confused how I can include it in my project. I have added it as a dependency in my <code>package.json</code>.</p>
  
  <pre><code>  "dependencies": {
  ...
      "quill": "1.3.6"
    }
  </code></pre>
  
  <p>and then I tried to use for the following <code>textarea</code></p>
  
  <pre><code>&lt;textarea id="question-description" type="text" class="form-control" formControlName="questionDescription" [ngClass]="validateField('questionDescription')"  rows="4"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>and initialize <code>Quill</code> like following in <code>ngAfterViewInit</code></p>
  
  <pre><code>var quill = new Quill('#question-description', {
    theme: 'snow'
  });
  </code></pre>
  
  <p>But I get error </p>
  
  <pre><code>ReferenceError: Quill is not defined
      at NewPracticeQuestionComponent.push../s
  </code></pre>
  
  <p>I have also added <code>declare var Quill:any;</code> at the top of the Component's <code>.ts</code> file</p>
  
  <p>I can see in <code>node_modules</code> that there is a <code>quill</code> folder and it has <code>dist/quill.js</code> where I suppose <code>Quill</code> object must be defined and exported (haven't checked it though).</p>
  
  <p>What am I doing wrong?</p>