title: TinyMCE Angular 5 cannot find themes/modern/theme.js
body: <p>So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my <code>EditorComponent</code>:</p>
  
  <pre><code>import { Component, OnInit, AfterViewInit, EventEmitter, Input, Output } from '@angular/core';
  
  import 'tinymce';
  
  declare var tinymce: any;
  
  @Component({
    selector: 'app-editor',
    templateUrl: './editor.component.html',
    styleUrls: ['./editor.component.scss']
  })
  export class EditorComponent implements OnInit, AfterViewInit {
  
    @Input() elementId: string;
    @Output() onEditorKeyup = new EventEmitter&lt;any&gt;();
  
    editor: any;
  
    constructor() { }
  
    ngOnInit() {
    }
  
    ngAfterViewInit() {
      tinymce.init({
        selector: '#' + this.elementId,
        plugins: ['link', 'paste', 'table'],
        skin_url: 'assets/skins/lightgray',
        setup: editor =&gt; {
          this.editor = editor;
          editor.on('keyup', () =&gt; {
            const content = editor.getContent();
            this.onEditorKeyup.emit(content);
          });
        } 
      });
    }
  
    ngOnDestroy() {
      tinymce.remove(this.editor);
    }
  
  }
  </code></pre>
  
  <p>and here is the markup for the <code>EditorComponent</code>:</p>
  
  <pre><code>&lt;textarea id="{{elementId}}"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>and now being used in a parent component:</p>
  
  <pre><code>&lt;app-editor [elementId]="'editor'" (onEditorKeyup)="keyupHandlerFunction($event)"&gt;&lt;/app-editor&gt;
  </code></pre>
  
  <p>I have followed this link from their website: <a href="https://www.tinymce.com/docs/integrations/angular2/" rel="noreferrer">https://www.tinymce.com/docs/integrations/angular2/</a></p>
  
  <p>in addition to a few other posts showing how to declare <code>tinymce</code> in the component. </p>
  
  <p>Here is the angular-cli.json app[0].scripts as well:</p>
  
  <pre><code>"scripts": [
          "../node_modules/tinymce/tinymce.js",
          "../node_modules/tinymce/themes/modern/theme.js",
          "../node_modules/tinymce/plugins/link/plugin.js",
          "../node_modules/tinymce/plugins/paste/plugin.js",
          "../node_modules/tinymce/plugins/table/plugin.js"
        ]
  </code></pre>
  
  <p>I seem to be getting this error in my console which is thrown by tinymce.js:</p>
  
  <p><a href="https://i.stack.imgur.com/Rb4vw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Rb4vw.png" alt="enter image description here"></a></p>
  
  <p>But I cannot find a replicated issue anywhere out there, and the console log gives no clue to where in my code this issue is arising. My editor component also just shows up completely blank in the parent component. I appreciate any and all help. Thanks in advance. </p>