如何在mat-tab-group中重新初始化TinyMCE

时间:2020-02-07 12:02:35

标签: angular angular-material angular6 tinymce mat-tab

<editor (onFocus)="onFocus()" #editor *ngIf="configData" [init]="configData" [formControl]="editorControl" (onChange)="contentChange($event)">
</editor>


@ViewChild('editor') myEditor;
ngOnChanges() {
   if(!this.currentTab) {
      this.myEditor.editor.remove();
   } else {
     // reinitialize editor here..
   }   
}

this.myEditor是此处的编辑器参考,有助于删除编辑器。如何用于重新初始化

0 个答案:

没有答案