AnsweredAssumed Answered

Scaling an iFrame dynamically

Question asked by Michael Marboe on May 30, 2017
Latest reply on Jun 13, 2017 by Gideon Williams

Hello Canvas community,


We have an HTML, CSS and JS-based expandable fact-box that basically expands on click and reveals a block of text vertically. 


The only option for integrating this into Canvas is through an HTML iframe, but the problem is that the width and height of an iframe is predefined and so the text-block revealed can only be reached by scrolling inside the iframe once revealed (which defeats the point of even having an expandable fact-box). On a regular webpage, the revealed content of the fact-box would simply push other elements below it down. This is what I want to achieve inside Canvas' HTML editor.


Does anyone know of a way to make an iframe follow the size of its content dynamically inside Canvas? I've tried a few things, but Canvas auto-formats the most common fixes out of the iframe HTML syntax.