TinyMCE dynamic content not displaying

I have a process to upload a newsletter to the database. I was able to get the Wappler system to add the content via a server connect form, but i am strugging to get the data to display after its been added and in an Edit function.

So here is the content without any TinyMCE formatting. As you can see it has the correct HTML content displayed

Once i add the script information for the TinyMCE, it doesn’t display anything. I have bind the data correctly to the textarea input as well

<label for="inp_newsletter">Newsletter</label> <textarea id="inp_newsletter" name="newsletter" dmx-bind:value="serverconnect1.data.query1[0].newsletter" class="form-control"></textarea>

any ideas what i causing it not to display?

Most probably the tinymce plugin loads before the data is available on the page. You will most probably need to initialize it once the dynamic data is available / server action has loaded it.

1 Like

any thoughts on how to setup a delay to get this to load? I have it currently setup as an include file.

I am not referring to a delay. Try to initialize your custom TinyMCE script on server action done static event, for example:

ondone="tinymce_init()"
<script>
function tinymce_init() {
  your TinyMCE code here …
}
</script>

gotcha, i will try that. Thank you

okay, i tried this and unfortunately it didn’t populate as expeted.

<dmx-serverconnect id="sc_newsletter" url="/dmxConnect/api/admin/get_newsletter.asp" dmx-param:newsletter_id="session1.data.newsletter_id" ondone="tinymce_init()"></dmx-serverconnect>

here is the onpage display

Can you please send me a link to your page where i can check this?

Teodor, i was able to figure it out. I put the script towards the bottom of the page above the tag. Then it work as expected.

Thank you so much for your help!!