mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-29 20:56:10 +01:00
chore(theme): rename file
This commit is contained in:
parent
da8d87c1f9
commit
626da294c4
2 changed files with 1 additions and 1 deletions
32
src/app/@theme/components/tiny-mce/tiny-mce.component.ts
Normal file
32
src/app/@theme/components/tiny-mce/tiny-mce.component.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { Component, OnDestroy, AfterViewInit, Output, EventEmitter, ElementRef } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-tiny-mce',
|
||||
template: '',
|
||||
})
|
||||
export class TinyMCEComponent implements OnDestroy, AfterViewInit {
|
||||
|
||||
@Output() editorKeyup = new EventEmitter<any>();
|
||||
|
||||
editor: any;
|
||||
|
||||
constructor(private host: ElementRef) { }
|
||||
|
||||
ngAfterViewInit() {
|
||||
tinymce.init({
|
||||
target: this.host.nativeElement,
|
||||
plugins: ['link', 'paste', 'table'],
|
||||
skin_url: 'assets/skins/lightgray',
|
||||
setup: editor => {
|
||||
this.editor = editor;
|
||||
editor.on('keyup', () => {
|
||||
this.editorKeyup.emit(editor.getContent());
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
tinymce.remove(this.editor);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue