Optional
customizationEnables customization of looks and behavior See the documentation page on customization for more details.
Optional
alterLibraryFiles?: (This hook is called when the editor creates the list of files that are loaded when displaying the editor for a library. Note: This function should be immutable, so it shouldn't change the scripts and styles parameters but create new arrays!
Optional
alterLibraryLanguageFile?: (This hook is called when the editor retrieves the language file of a library in a specific language. You can change the language file in the hook, e.g. by adding or removing entries. Note: This function should be immutable, so it shouldn't change the languageFile parameter but return a clone! Note: If you change the semantic structure of a library, you must also change the language files by using the this hook!
Optional
alterLibrarySemantics?: (library: ILibraryName, semantics: ISemanticsEntry[]) => ISemanticsEntry[]This hook is called when the editor retrieves the semantics of a
library. You can change the semantics in the hook, e.g. by adding or
removing entries.
Note: This function should be immutable, so it shouldn't change the
semantics parameter but return a clone!
Note: If you change the semantic structure of a library, you must
also change its language files by using the
alterLibraryLanguageFile
hook!
Optional
global?: { scripts?: string[]; styles?: string[] }Lists of JavaScript and CSS files that should always be appended to the list of core editor files.
Optional
enableIf true, the system will localize the information about content types displayed in the H5P Hub. It will use the translationCallback that is passed to H5PEditor for this by getting translations from the namespace 'hub'. It will try to localize these language strings: hub:H5P_Example.description hub:H5P_Example.summary hub:H5P_Example.keywords.key_word1 hub:H5P_Example.keywords.key_word2 hub:H5P_Example.keywords. ... Note that "H5P_Example" is a transformed version of the machineName of the content type main library, in which . is replaced by _. In the key words whitespaces are replaced by _.
Optional
enableIf true, the system will localize library titles. It will use the translationCallback that is passed to H5PEditor for this by getting translations from the namespace 'library-metadata'. It will try to localize these language strings: hub:H5P_Example.title Note that "H5P_Example" is a transformed version of the machineName of the content type main library, in which . is replaced by _. In the key words whitespaces are replaced by _.
Optional
fileA list of file sanitizers that are executed for content files in order of the array when a file or package is uploaded.
Optional
getAllows you to inject custom machine ids. This id is sent to the H5P.org Hub server when registering to get a UUID for the local instance or when refreshing the list of available content types.
By default the server gets an ID for the local machine by calling node-machine-id, so you don't have to use the override. There are cases in which calling node-machine-id might not work, so you can use the override.
Optional
hooksHooks allow you to react to things happening in the library.
Optional
lockA lock provider to use. By default, the library uses a single-process lock. You must pass in a distributed lock implementation if the library is used in a multi-process or cluster environment.
Optional
malwareA list of file malware scanners that are executed for content files in order of the array when a file or package is uploaded.
Optional
permission
The options that can be passed to the constructor of H5PEditor