Html in Text?

is it possible for me to post Html in dynamic text of a database and have it show up ?

Yes, you can use the Rich Text field type for that.
If you connect a text element to a rich text field, it will automatically display the HTML representation you entered in the database.

1 Like

Yes Francisco, it is. Others have been looking at the same thing (inc. me) so I will give you a quick rundown of what I have learned;

  • you can set from code the text.text or text.html property, but it is a limited set of html that this element supports (lookup $w.text and then html in the API)
  • you can use the html-component and set a source in code (src=…)if you want to display a page with a URL or you can throw more complex html at it by using the postmessage/onmessage events in code and client side html. The following article explains it: Velo: Working with the HTML iframe Element | Help Center | Wix.com

Good luck.

1 Like

Was unaware of what Tomer suggested. Going to try that out right now. Thanks, Tomer.

No problem, let me know if it works for you.

Tomer, played with it for a little while, but it did not do what I wanted right away. Not clear headed right now, it´s late, will give it another try tomorrow. Just one question: has this HTML-tab in the rich text field always been there, or is it something new? And doesn´t this make the html-component obsolete, while giving us something responsive/adaptive at the same time (unlike the html-comp)?

I suggest reading this article as well: Velo: About Formatting Text Elements | Help Center | Wix.com.

+1 on the article!
The HTML component is not a text element, meaning it can do a lot more than just displaying formatted text - embedding other services, components like charts and more.
Some examples: