provide an iframe based widget
tttp opened this issue · 0 comments
tttp commented
Hi,
sometimes, the js/css situation of the embedding page is such that it's better to give up and run the widget is an isolated iframe.
it's as easy as
<iframe src="https://widget.proca.app/d/{widget-name}/iframe.html" style="width:100%;height:800;border:0"></iframe>
however, the problem is that iframes don't automatically adjust the height based on the widget height, causing either unnecessary scrollbars or lot of empty white space
the solution:
<script src="//static.proca.app/widget/proca.js" data-url="https://widget.proca.app/d/{widget-name}"></script>it takes care of creating the iframe and automatically adjusts the height, even when the widget's height change as part of the journey