H5P NodeJS Library
    Preparing search index...

    Hierarchy

    Index

    Constructors

    Methods

    • Called immediately after a component is mounted. Setting state here will trigger re-rendering.

      Returns void

    • Called immediately after updating occurs. Not called for the initial render.

      The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

      Returns void

    • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

      Returns void

    • Runs before React applies the result of Component.render render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before Component.render render causes changes to it.

      Note: the presence of this method prevents any of the deprecated lifecycle events from running.

      Returns void

    • Returns ReactNode

    • Call this method to save the current state of the h5p editor. This will result in a call to the saveContentCallback that was passed in the through the props.

      Returns Promise<{ contentId: string; metadata: IContentMetadata }>

      an error if there was a problem (e.g. validation error of the content)