1 import { Component, OnDestroy, AfterViewInit, Output, EventEmitter, ElementRef } from '@angular/core';
4 selector: 'ngx-tiny-mce',
7 export class TinyMCEComponent implements OnDestroy, AfterViewInit {
9 @Output() editorKeyup = new EventEmitter<any>();
13 constructor(private host: ElementRef) { }
17 target: this.host.nativeElement,
18 plugins: ['link', 'paste', 'table'],
19 skin_url: 'assets/skins/lightgray',
22 editor.on('keyup', () => {
23 this.editorKeyup.emit(editor.getContent());
31 tinymce.remove(this.editor);