Insert H5P content in the document
h5p(
id,
baseurl,
width = 780,
height = 500,
toc = "",
toc.def = "H5P exercise {id}",
h5p.img = "images/list-h5p.png",
h5p.link = "h5p"
)
The ID of the H5P content in your Wordpress.
The first part of the URL for your domain, usually something
like https://my.site.com
without the trailing /
.
The width of the iframe where the H5P content is displayed.
The height of the iframe.
Entry to use in the exercises table of content (NULL
if no
entry, ""
for a default entry based on toc.def =
).
Text for a default toc entry using glue()
syntax for
replacement, e.g., {var}
.
The image to display in front of the toc entry
The link when the image is clicked (sends to an help page about learnr tutorials).
HTML code that generates the iframe. It is most conveniently used inside and R inline expression in your R Markdown document on its own line with one blank line above and bellow it.
This function is designed to work inside a Wordpress site where the H5P plugin has been installed. You should also serve your bookdown pages as a subdirectory inside of the same Wordpress site to allow free communication between the parent (the bookdown page) and the child document in the iframe (the H5P content).