Using an HTML editor with Wappler

I did a small test with Summernote and it seems to works fine. I think you have problems with setting the value using an App Connect binding. The dmx-bind:value is set after the editor is initialized, so the value is not set in the editor.

I did some tests and found that the updated event we have for App Connect will help, add onupdated="$('#summernote').summernote('code', this.data.value);" to the textarea to set the code of the editor after it received the value. Change the id to the id of your text area.

Normally the this in the event should point to the html element, this is not the case at this moment in App Connect, this points to the component Class, there the value is stored in the data property. It is possible that we change the this for these events later to point to the html element, when this would change then the above code will not work, this.data.value should then be changed to this.value.

2 Likes