Hi,
I think there might be an issue when setting content and then switching to "preview" mode, then back to "editor" mode - the editor text has the old content until you click on editor, or change it.
If you click edit - it shows "123" then click cancel, then click edit again and it still shows "123" until you click on the editor then changes to "xyz".
If you uncomment the setTimeout then that fixes it.
Hi, I think there might be an issue when setting content and then switching to "preview" mode, then back to "editor" mode - the editor text has the old content until you click on editor, or change it.
<md-editor name="Content" [(ngModel)]="content" [mode]="mode" [height]="'400px'" [options]="options" required>
ngOnInit(): void { this.content = "123"; }
editClick() { this.mode = "editor"; }
cancelClick() { this.content = "xyz"; this.mode = "preview"; //setTimeout(() => { // this.mode = "preview"; //}, 100); }
If you click edit - it shows "123" then click cancel, then click edit again and it still shows "123" until you click on the editor then changes to "xyz".
If you uncomment the setTimeout then that fixes it.