Closed mattwarkentin closed 3 years ago
You're running up against a quirk of how React handles HTML attributes. For full screen to work, the <iframe>
element needs the boolean attribute allowfullscreen
. In HTML5, boolean attribute values are indicated by presence or abscence of the attribute:
<!-- this iframe allows fullscreen -->
<iframe allowfullscreen></iframe>
<!-- this iframe does not -->
<iframe></iframe>
Unfortunately, React handles boolean attributes differently. For React to give you the correct answer, you need the HTML
<iframe allowfullscreen=true></iframe>
Extra unfortunately, it's almost impossible to write that kind of tag with htmltools. 😞
library(htmltools)
iframe <- tags$iframe
iframe(allowfullscreen = NA)
## <iframe allowfullscreen></iframe>
iframe(allowfullscreen = TRUE)
## <iframe allowfullscreen="TRUE"></iframe>
iframe(allowfullscreen = "true")
## <iframe allowfullscreen="true"></iframe>
iframe(allowfullscreen = HTML("true"))
## <iframe allowfullscreen="true"></iframe>
HTML("<iframe allowfullscreen=true></iframe>")
## <iframe allowfullscreen=true></iframe>
I can think of two options, but I'm not certain either will work.
colDef(html = TRUE)
and you'd also need to include the share again dependencies directly in the document elsewhere.details
. Again, you'd need to include the share again deps manually.I'm going to close this issue because I don't think there's much we can do in xaringanExtra, but please do post a solution if you discover one. And also link to your page of slides, the one in the reprex looks great and I've been wanting to learn more about targets! 😉
Hey @gadenbuie,
Any idea why the full screen functionality wouldn't work for a
xaringan
presentation embedded in a table? I am creating a table of presentations for the lab I belong to, and I want the HTML presentations embedded in the table, like below:The other buttons (e.g. change slides, share button) work, but full screen doesn't...