Open andrie opened 4 years ago
The iframeResizer JS library contains a two-part solution that posts messages between the host page and the iframe contents.
If learnr embeds the iframeResizer.contentWindow.min.js then the hosting page can embed the iframeResizer.min.js.
learnr
If we also get pkgdown to embed the iframeResizer.min.js component, then the resizing will happen out of the box for all pkgdown sites that embed tutorials.
pkgdown
iframeResizer.min.js
I have a working prototype of this for the exercises at https://sys-admin-training.netlify.com/
See https://github.com/rstudio/learnr/issues/392#issuecomment-655537795 for possible implementation details.
The iframeResizer JS library contains a two-part solution that posts messages between the host page and the iframe contents.
If
learnr
embeds the iframeResizer.contentWindow.min.js then the hosting page can embed the iframeResizer.min.js.If we also get
pkgdown
to embed theiframeResizer.min.js
component, then the resizing will happen out of the box for allpkgdown
sites that embed tutorials.I have a working prototype of this for the exercises at https://sys-admin-training.netlify.com/