For security, RISE removes JavaScript (the [removed] tags) when you save a custom page or a custom dashboard widget. If you need JavaScript there (for example a chat box, a tracking code or a small form script), you can allow it. There is no setting on the screen for this. You turn it on in a config file.
How to turn it on
Open the file app/Config/App.php and add one or both of these lines before the last closing bracket } of the file:
public $allow_javascript_in_custom_pages = true; public $allow_javascript_in_custom_widgets = true;
| Line | What it does |
| allow_javascript_in_custom_pages | Keeps JavaScript in custom pages (Settings > Pages). |
| allow_javascript_in_custom_widgets | Keeps JavaScript in custom dashboard widgets. Only widgets saved by an admin keep it. Widgets saved by other team members are still cleaned. |
Save the file. Then open the page or widget, add your script in the code view of the editor, and save it again. Scripts saved before you turned it on were already removed, so add them again.
Be careful
- A script runs in the browser of every person who opens the page or the dashboard.
- Turn it on only when you trust every admin who can edit these pages and widgets.
- To turn it off, remove the line or set it to false. Scripts saved earlier stay until you save the page or widget again.