Viewing H5P Content

Call the renderContent method on the global Lumi (window.Lumi) object. The method has two arguments:

  1. HTMLElement: The HTMLElement where the content should be rendered. For example document.getElementById('h5pcontent')

  2. The contentId of the content you wish to render.

Lumi.renderContent(<HTMLElement>, <contentId>);

For Example:

Lumi.renderContent(document.getElementById("h5pcontent"), "660c1c213b1f35e0916cf845");

Codepen example

Last updated