Adding Unique HTML Widgets to Dynamic Page

Thank you! That is exactly what I am looking for. I currently have this code on my dynamic page:
$w.onReady( function () {
$w(“#html2”).onMessage( (event, $w) => {
console.log(Message received by page code: ${event.data});
} );
$w(“#html2”).postMessage(“Message from page code!”);
}
);

And this is what I have in the html component:
<!doctype html>

HTML Component Test

Message will go here

This makes the html component test work perfectly. How do I now change it to take the information from my database? I see in the other post you mentioned getcurrentitem. Where and how do I insert this into my code?

Also, when putting the html code into my database, which field type should it be?

I apologize for all my questions! I am very new to all of this, but I love learning it! Thank you for your help!