import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css']
})
export class TestComponent implements OnInit {
constructor() { }
ngOnInit() {
setTimeout(_=>{
if (this.um != undefined) this.um.setContent(this.content);
},3000)
}
onLoad(um:any){
console.log(um);
this.um=um
this.um.setContent(this.content)
}
onChange(content: string){
this.content=content;
}
content: string;
config: any = {
toolbar: [
'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
'| justifyleft justifycenter justifyright justifyjustify |',
'link unlink | emotion image ',
'| horizontal print preview fullscreen'],
imageUrl: 'http://www.example.com/upload',
imagePath: '/'
}
um:any
}