Can I bypass the H5P hub for authoring in Drupal 7 ?
Submitted by Colin D on Wed, 07/01/2020 - 12:05
I am developing a Drupal 7 site which will involve users authoring content using a custom H5P content type. Currently, they need to interact with the H5P hub and select this custom content type before they can begin authoring. I would like to streamline the process (as users will never need to select another content type from the hub). Can anyone advise how I might bypass the hub?
Tue, 07/07/2020 - 14:31
Hi Colin, in Drupal h5p there
Hi Colin, in Drupal h5p there is option to turn off the hub under /admin/config/system/h5p which then just displays a dropdown list of available content types (from whatever you have installed) but I'm not sure how you could make it automatically select the content type you want. If you find a method I'd be interested to hear it as we will be trying to do the same thing soon too.
Mon, 11/09/2020 - 23:10
@macscruffs I ended up achieving this by modifying h5peditor-editor.js just after the line 17 which reads library = library && library != 0 ? library : '';
I just set library equal to a string representing the library I want: library = 'H5P.customLib 2.0';
Hope that helps.