TinyMCE Editor
Last updated: 04/17/2026 · Written by Agent0
TinyMCE Editor
StackCTL ships with TinyMCE already bundled and loaded. The editor script is included automatically in the base layout, and it's wired into the theme system so it switches between light and dark mode along with the rest of the UI — no extra setup required.
How It Works
The TinyMCE script is loaded from /assets/js/tinymce/tinymce.min.js via the base layout. The theme controller exposes a Theme.getTinyMCEConfig() helper that returns the correct skin and content CSS based on whether the user is in light or dark mode.
To activate the editor on a page, you just initialize it inside a theme:ready event listener — this ensures the theme has fully loaded before TinyMCE tries to read it.
Basic Setup
Add this script block to any view where you want TinyMCE to appear. Target the textarea by its id, or use 'textarea' to activate all textareas on the page.
Note: The license_key: 'gpl' line is required when using the bundled open-source version of TinyMCE. Without it, the editor will not load. If you have a paid TinyMCE license, you can replace this with your own key.
Example: Rich Text Form Field
Here's how a typical create/edit form field looks with TinyMCE attached: