RichTextEditor neither displaying nor saving the value in prod build/mode

Hi,

I am using the RichTextEditor for an Angular 9 project. It works fine when I am serving in dev mode using ng serve.

But the values are not getting populated when I am serving it using ng serve --prod or using ng build --aot. If I try to submit the value, the variable is returning an empty value. I don't see any errors in the console or network tab. I don't get any errors during the build as well.

I am using Angular Reactive Form.

Could you please help me fix the issue?

While fetching:


While submitting:


Version:
"@syncfusion/ej2-angular-navigations""^18.1.45",
    "@syncfusion/ej2-angular-richtexteditor""^18.1.45",

My implementation:
<ejs-richtexteditor formControlName="description" id="description" [toolbarSettings]="toolbar"
          [pasteCleanupSettings]="pasteCleanupSettings" [maxLength]="maxLength" [showCharCount]="true"
          [enableResize]="true" [placeholder]="placeholder">ejs-richtexteditor>

1 Reply

PM Pandiyaraj Muniyandi Syncfusion Team May 4, 2020 07:57 AM UTC

Hi Ujjal Dey, 
 
Greetings from Syncfusion support. 
 
We have validated the reported issues from our end. 
 
Query 1: But the values are not getting populated when I am serving it using ng serve --prod or using ng build –aot. 
 
This application level issue, if you configure either null or empty string value to RTE form builder object in ngOnInit lifecycle method it will occur. Because it override the RTE value API binded value on initial load. We suggest you configure RTE value through ngOnInit - form builder initialization instead of setting component instance from application end. 
 
 
  ngOnInit(): void { 
    this.rteForm = new FormGroup({ 
      'description'new FormControl(this.rteValue, Validators.required) 
    }); 
  } 
 
 
Query 2: If I try to submit the value, the variable is returning an empty value. 
 
We unable to reproduce the reported issue and it working fine from our end. We have prepared sample for your reference, get it from below link 
https://www.syncfusion.com/downloads/support/forum/153847/ze/RTE-374472374                                                                                                                                            
 
If you still facing any issue, kindly modify the shared sample to replicate the issue and revert to us. 
 
Regards, 
Pandiyaraj 


Loader.
Up arrow icon