the path on the local filesystem at which the H5P core files can be found. (should contain a js and styles directory)
the path on the local filesystem at which the H5P editor files can be found. (Should contain the scripts, styles and ckeditor directories).
Optional
template: IExporterTemplateOptional
translationFunction: ITranslationFunctionProtected
configProtected
contentProtected
corethe path on the local filesystem at which the H5P core files can be found. (should contain a js and styles directory)
Protected
editorthe path on the local filesystem at which the H5P editor files can be found. (Should contain the scripts, styles and ckeditor directories).
Protected
libraryProtected
Optional
templateCreates a HTML file that contains all scripts, styles and library resources (images and fonts) inline. All resources used inside the content are only listed and must be retrieved from library storage by the caller.
a content id that can be found in the content repository passed into the constructor
the user who wants to create the bundle
(optional) if set, the prefix will be added to all content files in the content's parameters; example: contentResourcesPrefix = '123'; filename = 'images/image.jpg' => filename in parameters: '123/images/image.jpg' (the directory separated is added automatically)
Optional
options: {(optional) allows settings display options, e.g. if there should be a embed button
a HTML string that can be written into a file and a list of content files used by the content; you can use the filenames in IContentStorage.getFileStream. Note that the returned filenames DO NOT include the prefix, so that the caller doesn't have to remove it when calling getFileStream.
Creates a single HTML file that contains all scripts, styles and resources (images, videos, etc.) inline. This bundle will grow very large if there are big videos in the content.
a content id that can be found in the content repository passed into the constructor
the user who wants to create the bundle
Optional
options: {(optional) allows settings display options, e.g. if there should be a embed button
a HTML string that can be written into a file
Creates standalone HTML packages that can be used to display H5P in a browser without having to use the full H5P server backend.
The bundle includes all JavaScript files, stylesheets, fonts of the H5P core and all libraries used in the content. It also includes base64 encoded resources used in the content itself. This can make the files seriously big, if the content includes video files or lots of high-res images.
The bundle does NOT internalize resources that are included in the content via absolute URLs but only resources that are part of the H5P package.
The HTML exports work with all content types on the official H5P Hub, but there might be unexpected issues with other content types if they behave weirdly and in any kind of non-standard way.
The exported bundle contains license information for each file put into the bundle in a shortened fashion (only includes author and license name and not full license text).
(important!) You need to install these NPM packages for the exporter to work: postcss, postcss-clean, postcss-url, postcss-safe-parser, uglify-js