Reset trumbowyg
Closed this issue · 2 comments
HegdeSach commented
Is there any way to reset user input to empty?
monad98 commented
<button (click)="reset()">Reset</button>
reset() {
this.initialContentOne = "";
}
monad98 commented
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 = '';
}