EduSharingWidgets
Purpose
EduSharingWidgets is a MediaWiki extension that embeds edu-sharing widgets via a VisualEditor dialog and a custom tag.
Requirements
-
MediaWiki 1.43+
-
VisualEditor (for the dialog)
Usage
The extension adds a toolbar button in VisualEditor where users can paste the full edu-sharing widget HTML snippet. The snippet is stored in a custom tag and rendered on page view.
Tag syntax
<edusharing-widget>
...paste embed HTML here...
</edusharing-widget>
VisualEditor
-
Edit a page in VisualEditor.
-
Insert an edu-sharing widget via the toolbar.
-
Paste the embed code and optionally set width/alignment.
Configuration
Add to LocalSettings.php:
wfLoadExtension( 'EduSharingWidgets' );
// Optional: default API URL injected into window.__env if missing in the embed code
$wgEduSharingWidgetsApiUrl = 'https://repository.staging.openeduhub.net/edu-sharing/rest';
// Optional: backend base URL for the proxy (no path)
$wgEduSharingWidgetsProxyBackendUrl = 'https://repository.staging.openeduhub.net';
The proxy endpoint is Special:EduSharingWidgetsProxy and is used for CSS/JS assets to avoid CORS issues.