Fixed webapp build in production mode
[src/xds/xds-agent.git] / webapp / src / app / @theme / components / tiny-mce / tiny-mce.component.ts
1 /* MODS_XDS: not used for now
2 import { Component, OnDestroy, AfterViewInit, Output, EventEmitter, ElementRef } from '@angular/core';
3
4 @Component({
5   selector: 'ngx-tiny-mce',
6   template: '',
7 })
8 export class TinyMCEComponent implements OnDestroy, AfterViewInit {
9
10   @Output() editorKeyup = new EventEmitter<any>();
11
12   editor: any;
13
14   constructor(private host: ElementRef) { }
15
16   ngAfterViewInit() {
17     tinymce.init({
18       target: this.host.nativeElement,
19       plugins: ['link', 'paste', 'table'],
20       skin_url: 'assets/skins/lightgray',
21       setup: editor => {
22         this.editor = editor;
23         editor.on('keyup', () => {
24           this.editorKeyup.emit(editor.getContent());
25         });
26       },
27       height: '320',
28     });
29   }
30
31   ngOnDestroy() {
32     tinymce.remove(this.editor);
33   }
34 }
35 */