Topic: WYSIWYG editor - unable to set initial value (no @inputs present)

japan priority asked 3 years ago


Expected behavior I need the wysiwyg to enable setting initial value. This is needed for enabling of editing existing values (i.e. loaded from server) within forms.

Actual behavior Unable to set the value. No documentation around this feature in here: https://mdbootstrap.com/plugins/angular/wysiwyg/

Is it on your development roadmap or is there this feature and I just missed it?


JeroenVunderink premium answered 3 years ago


Hi,

I use a form group:

ngOnInit(): void {
    this.frm = new FormGroup({
        remarks: new FormControl('', [Validators.required]),
    });
    RetrieveData();
}

Then I retrieve the data in RetrieveData and within the the restCall I set the value.

 this.frm.controls.remarks.setValue(this.data.Remarks);

Hope this helps.


japan priority commented 3 years ago

Hi, thanks, you're right, the easiest solution is the best, this works ! Cheers !



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 10.0.0
  • Device: any device
  • Browser: all browsers
  • OS: any os
  • Provided sample code: No
  • Provided link: Yes
Tags