monad98/ng2-lazy-trumbowyg

Reset trumbowyg

Closed this issue · 2 comments

Is there any way to reset user input to empty?

<button (click)="reset()">Reset</button>

reset() {
    this.initialContentOne = "";
}

Above works only one. I didn't implement reset api. If you want, you can try following

<trumbowyg liveUpdate="true" #editor
               [initialContent]="initialContentTwo"
               [options]="options2"
               (savedContent)="contentTwo=$event">
@ViewChild('editor') editor;
reset() {
    this.editor.trumbowygEl.trumbowyg('empty');
    this.contentTwo = '';
  }