I am trying to embed a HTML file that exceeds Webflow’s character limit. It is a HTMLwidget built in RStudio. My problem seems almost identical to that of this old thread, which did reach a solution that I don’t fully understand — is someone able to offer any advice or explanation?
So far I have tried implementing the advice from this workaround but the embed just turns up blank. I’m guessing this is to do with the way R has exported the scripts.
If anyone has any knowledge on this specific matter — exporting R HTMLwidgets and embedding them in Webflow — I would greatly appreciate the help!
Hi Sophie, I don’t have experience with R widgets but in general the approach is to host your code externally, and your HTML elements in an HTML embed, and design it so that the code will then enable the functionality in your embed.
Just basic HTML / JS / CSS separation.
Typically, I’d store the JS in github, and then deliver it through jsDelivr, but there are a lot of options.
I have some experience with embedding R HTMLwidgets that exceed Webflow’s character limits. The workaround you referenced is still valid, but can be tricky to implement properly.
The key things to check:
When exporting your HTMLwidget from RStudio, make sure you are exporting the “standalone” version - this bundles all the necessary JavaScript rather than relying on external CDN links.
Double check that the exported HTML file is fully self-contained - inspect the code and confirm the JavaScript, CSS, and any other assets are bundled in the file rather than loaded externally.
For embedding, upload that HTML file to a server like GitHub Pages. Then paste the direct file download URL into Webflow’s Embed Code widget.
The embed may still not work until you toggle the “Disable Webflow JS” switch in the Embed widget settings. This prevents Webflow from trying to load/parse resources from that HTML.
Let me know if any part of those steps needs more clarification! Getting the exported widget set up properly can take some tweaking. I’m happy to help troubleshoot further if you share more details on how your file is structured currently. Feel free to DM me as well!