Moodle TinyMCE justify plugin — adds a Justify button to the TinyMCE editor toolbar, allowing users to apply full text justification in Moodle content areas.
- Moodle 4.5 or later (TinyMCE editor)
Via Git:
git clone https://github.com/cte-zl-ifrn/moodle-tiny_justify.git justifyPlace the justify folder inside /lib/editor/tiny/plugins/ in your Moodle installation directory.
Via ZIP:
- Download the ZIP file from the releases page.
- In Moodle, go to Site Administration → Plugins → Install plugins and upload the ZIP file.
- Follow the on-screen instructions to complete the installation.
After installation, go to Site Administration → Plugins → Text editors → TinyMCE editor → General settings and ensure the Justify plugin is enabled in the toolbar configuration.
Once installed and enabled, a Justify button will appear in the TinyMCE toolbar. Click it to apply full text justification to the selected text or current paragraph.
If you change files in amd/src/ (for example plugin.js, commands.js, or configuration.js), Moodle will only use the new code after:
- having compiled files in
amd/build/; - plugin upgrade (when version changes);
- cache purge.
Update version.php with a new $plugin->version value.
In standard Moodle development, compile with Grunt from Moodle root:
npx grunt amd --root=lib/editor/tiny/plugins/justifyIn this AVA environment, the moodle container may not include node/npx/grunt. If so, keep the precompiled files in amd/build/ committed to the plugin repository.
From the AVA workspace root:
docker compose exec -T -w /var/www/html moodle php admin/cli/upgrade.php --non-interactive
docker compose exec -T -w /var/www/html moodle php admin/cli/purge_caches.phpReload the editor page with a hard refresh (Ctrl+F5).
If Justify does not appear in toolbar/menu/quick toolbar:
- Confirm
amd/build/*.min.jsexists for this plugin. - Confirm plugin version in
version.phpwas increased. - Run
upgrade.phpandpurge_caches.phpagain. - Check TinyMCE settings in Moodle admin and ensure the plugin/button is enabled in the toolbar setup.
This plugin is licensed under the GNU GPL v3 or later.
Please read CONTRIBUTING.md for details on how to contribute to this project.