HTMLComponent Edit Code with JavaScript

In a simple scenario, I have a button, a text box, and an HTML box. I want to be able to type something into the text box, and use the typed value in the code for a HTML widget. When the button is clicked, the generated code gets added into the HTML box.

I want to reload the HTML box every time the button is clicked.

How should I go about doing this?

Thank you for your help!
Mitch W

Hi Mitchell,

The code in an HtmlComponent cannot be changed via the API. The only way to modify the code content of the HtmlComponent is with the Edit Code button in the editor. The other option is to embed code by setting the src property to a URL (https only). You can read more about that in the src property API .

Good luck,

Yisrael