How to Link an HTML element in a Dynamic Page to Dataset?

Hi!
So basically what I am trying to do is, I have a Dynamic Page on which I want to “Embed” videos from a source, I have tried Linking HTML Element with Dataset following this code:

$w.onReady(() => {
    $w("#dynamicDataset").onReady( () => {
 let item = $w("#dynamicDataset").getCurrentItem();
 let text = item.htmlembed;
    $w("#html2").src = text;
    })
})

Where “dynamicDataset” is my dataset, “htmlembed” is the name of field in Dataset and “html2” is id of html element. The problem with this code is that the data in “htmlembed” field in dataset must be URL of Video Source otherwise it just doesn’t work. What I want to do is to Input an iFrame code in “htmlembed” field which should gets displayed on “html2”

Any Help will be highly appreciated :slight_smile:
Thanks in Advance!

The HtmlComponent does not currently support changing the embedded code via API.

Hey!
Thanks for the reply.
I want to ask that is there a way to send message to htmlcomponent to display item from database?
I have used the postmessage command but its not working for me. could you please help me with that?