Open IslamElKassas opened 3 years ago
We have the same behaviour in our application. Our backing field has a value set, but the editor is empty.
We use Froala Version 3.2.6-1
<textarea matInput [formControlName]="controlName" [id]="id"
#input [rows]="lines" (froalaInit)="initialize($event)"
[froalaEditor]="options" [(froalaModel)]="controlValue"></textarea>
@MRH4287 Yes in this version 3.2.6-1, I still have this issue.
I solved it temporarily by this code,
ngAfterViewInit()
{
this.froalaEditorOptions = {...FroalaEditorOptions};
}
Please some one tell us if this is the best way or not
@IslamElKassas We tried your workaround but it didn't solve the problem.
Any updates on this?
When I bind the froalaEditor directive with options object, and navigate to a page, and back to the editor again, then edit content, it some times update the content and some times does not (when get it from form data, or from two way binded variable).
Also the problem happened some times when hide and show the editor again with ngIf
I test it many times with two way binding, and within reactive forms. but the problem some times appears.
If I removed the binding, it will work well.
I also tried div and textarea
I use Fuse Angular Template, Froala 3.2.3
Here are my codes:
<div [froalaEditor]="froalaEditorOptions" formControlName="emailContent"></div>
all js files imported in a separate module