import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';

@Component({
  selector: 'app-richtext',
  templateUrl: './richtext.component.html',
  styleUrls: ['./richtext.component.less']
})
export class RichtextComponent implements OnInit {
  // 定义富文本高度
  config: any = {
    initialFrameHeight: 400,
  };

  @Output() newTextEvent = new EventEmitter(); // 定义装饰器
  @Input() content: string;
  constructor(

  ) {
  }

  ngOnInit() {
    this.newTextEvent.emit(this.content);
  }

  handleChange(event) {
    this.newTextEvent.emit(event);
  }

}
