Open RLesur opened 5 years ago
I succed to synchronize htmlwidgets and Paged.js here: https://github.com/rstudio/pagedown/compare/master...RLesur:htmlwidgets But the result is a total mess: widgets are not properly sized, plot.ly is broken by Paged.js... So, synchronisation of htmlwidgets and Paged.js is a big fail.
I think that another way could be investigated: embedding widgets in iframes. The mechanism would be very similar to screenshot: for each widget, we could save it to an html file. Instead of a screenshot, we could embed them in iframes. I've played with iframes and Paged.js: it works well. However, I don't know how to make crosstalk working with iframes.
@yihui what do you think of that?
For now, htmlwidgets are not rendered by
pagedown::html_paged()
.I think there are many technical challenges with this issue.
The only success I've obtained is about the rendering synchronization, see https://github.com/RLesur/pagedown/commit/7608c1bfb405b3d3cdbbccedbe9dbf3b52571be7 But I didn't succeed to keep interactivity (I'm not familiar with htmlwidgets internals).
If there is a ninja.js who could help on this issue, this would be great!