I have a use case where I want my users to be able to read and view certain news articles from within Retool. I am getting the article URL from a query (and can potentially get their HTML content as well). When I put the HTML string in a component and render it as HTML, the article is hardly readable due to incomplete formatting (which is expected). I thought I could use one of the readability libraries in javascript (example ) to improve the formatting but I can't find one that has a minified version (as explained here). I can't do iframes as most news websites do not allow that either.
So I am wondering what my other options are. Is there a workaround for this use case?
Hmm, this might be tricky. Would you mind sharing an example HTML string? And just to double check, you're only getting HTML and the URL for each article, correct?
happy to share a sample HTML but any ideas on how I could do that? the string is too big for the text box and the interface won't allow me to upload a file coz I'm a new user.
Also, could you explain a little more about what you mean by only getting HTML and URL? I do have some control over the backend to try and send other data if that would help somehow.
I was facing the same problem! My solution was to tweak RSS feeds to my needs.
Take a look at the website where the said posts are published and check if they offer RSS. Pretty much every blog system (e.g. any wordpress site) offers that.
Then grab the RSS url of the desired article and parse the (unformatted raw data) to your needs! RSS feeds use the XML format, but it's fairly simple to convert them into JSON and further process them in retool.
Hmm, that's an interesting approach. I have over a hundred potential websites from where the articles come. I agree most of them would have some sort of RSS feed, but it seems like a lot of overhead if I have to tweak some things individually for each website.