Question about copying H5P content between sites
Submitted by Qanon on Fri, 01/17/2025 - 09:55
Forums:
The docs mention: Copy/paste feature works only within an H5P site, not between different H5P sites. To reuse content between sites, use download/upload option.
I wanted to ask if this is intended or not. Having the ability to do that would significantly impact my workflow so I was wondering if there is a workaround for it in some way or if this is a feature that we can request.
Summary:
allow pasting h5p content across sites?
otacke
Fri, 01/17/2025 - 19:12
Permalink
Sorry, some tech babble ..
Sorry, some tech babble ...
You cannot paste between sites, because H5P implements the copy/paste feature via the browser's localStorage which cannot be accessed cross-domain.
You could, of course, copy the `h5pClipoard` key-value pair from one browser window to the other (from one domain to the other) manually, but I doubt that this would be much faster than downloading/uploading and you'd not be able to paste media this way. So I don't think this is feasible.
One could think about using the browser's clipboardAPI instead. That should work fine across domains, but media would pose some obstacles (base64 encoding/decoding, OR fetching them from the original server IF the content is openly accessible PLUS - either way - storing the files on the server-side). Don't know if H5P Group would be interested in implementing this. You should post this on the feature request forum and hope many people vote for this request.