feat(playground): auto-load the editor via a blueprint unzip step#62
Merged
Conversation
Add an 'unzip' blueprint step that fetches the shared eXeLearning editor release asset through the github-proxy and extracts it into the plugin's bundled dist/static, so the playground boots with a working editor instead of requiring the manual "Download & Install Editor" button. The static editor is byte-identical across all eXeLearning plugins and is already published once at exelearning/exelearning, so it is pulled over the fast JS transport (Cache API). The release asset wraps everything in a 'static/' folder, so extracting into 'dist' yields 'dist/static/...', which embedded_editor_source_resolver serves via its 'bundled' precedence (moodledata -> bundled -> none). Pinned to v4.0.0 to match .editor-version for deterministic previews. embedded_editor_installer is kept for production/offline installs; the PR-preview note is updated accordingly.
Match the WordPress/Omeka README style: render the 'Preview in Moodle Playground' button via an HTML <img width="224"> (smaller) and add the note that the editor is fetched from the shared release and unpacked on boot. The blueprint URL is unchanged.
ignaciogros
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Auto-load the embedded eXeLearning editor in the Playground via a single
unzipblueprint step, so it boots with a working editor instead of requiring the manual Download & Install Editor button.{ "step": "unzip", "destination": "/www/moodle/mod/exeweb/dist", "data": { "url": "https://github-proxy.exelearning.dev/?repo=exelearning/exelearning&release=v4.0.0&asset=exelearning-static-v4.0.0.zip" } }Why
The static editor is byte-identical across all eXeLearning plugins and is already published once at
exelearning/exelearning. Fetching that shared artifact through the github-proxy (CORS) over the fast JS transport is the WordPress-Playground-idiomatic pattern and avoids both a per-PR built artifact and the slow runtime PHP download. The release asset wraps everything in astatic/folder, so extracting intodistyieldsdist/static/..., whichembedded_editor_source_resolverserves via itsbundledprecedence (moodledata -> bundled -> none). Pinned tov4.0.0to match.editor-versionfor deterministic previews.embedded_editor_installeris kept for production/offline installs; only the playground changes.Test
Open the Playground for this branch and confirm the editor loads on boot (no manual step), the editor zip is fetched from
github-proxy.exelearning.dev, and a page renders.Moodle Playground Preview
The changes in this pull request can be previewed and tested using a Moodle Playground instance.
ℹ️ The eXeLearning editor is fetched from the shared release and unpacked into the plugin when the playground boots, so the first load may take a few extra seconds. ELPX upload, viewer and preview work normally.