543
Views
5
Comments
Solved
How to insert HTML code inside a DIV
Question

Hello everyone,

I am trying to insert the twitter feed inside my reactive web application. I am using the InjectHTML forge app to do that, the only problem is that to make it work I have to insert the HTML inside a div, but I don't know how to do it. Can you please help me?

The HTML that I am using is this one:

"<a class='twitter-timeline' data-width='500' data-height='1000' data-theme='light' href='https://twitter.com/WWF?ref_src=twsrc%5Etfw'>Tweets by WWF</a> <script async src='https://platform.twitter.com/widgets.js' charset='utf-8'></script>"

2022-04-19 13-20-22
Andrea Lembo
Solution

Hi,

I've attached an example OML to this comment.

The result on the page :

I've created a simply block that accept an html string as input paremeter.

Let me know if you need some information.

TestTwitter.oml
2022-09-05 13-52-13
Omar Bashmail

It works for me, thank you. 

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

You can use HTML Tag Widget to implement your Html code

https://success.outsystems.com/Documentation/How-to_Guides/Front-End/How_to_generate_HTML_tags?

You can also check this component available

I hope this will help

Thanks

UserImage.jpg
Eugenia Saggioro

Hello Tousif,

I am already using InjectHTML, the only problem is that what I see when I open in browser the application is this (first image) instead of something like this (second image).

2022-04-19 13-20-22
Andrea Lembo
Solution

Hi,

I've attached an example OML to this comment.

The result on the page :

I've created a simply block that accept an html string as input paremeter.

Let me know if you need some information.

TestTwitter.oml
2022-09-05 13-52-13
Omar Bashmail

It works for me, thank you. 

UserImage.jpg
Eugenia Saggioro

Thank you very much Andrea! Super useful :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.