PLEASE DO NOT INSTALL THIS EXTENSION UNLESS YOU KNOW WHAT YOU ARE DOING!
This extension adds a scratchpad feature to the admin panel of Flarum to ease testing and development for developers.
While the feature is restricted to admin users, I still recommend installing this on local environments only.
This is still very experimental. Use at your own risks.
- Debug mode must be turned on
eval() is used to run PHP code
shell_exec() is used to run Node
- The web user must be able to run
You can give names to individual scratchpads and enable/disable them via a checkbox.
There's a good chance that despite the checks in place you will be able to save invalid code.
If that happens, the easier is to go in the database and disable the scratchpad that's responsible.
PHP is validated at save time, an invalid syntax will prevent saving.
Less is currently not validated.
scratchpad folder will be created under
The first time you compile,
npm install will run.
Subsequent compilations will re-use the installed dependencies.
storage/scratchpad folder and the extension will re-install everything on the next compilation.
The text editor on the Scratchpad page is CodeMirror.
You can customize the theme and indentation via the cog icon above the editor.
For now the settings are global and apply to all languages.
Please read the disclaimers and requirements above before installing.
composer require clarkwinkelmann/flarum-ext-scratchpad