-
- 160 Posts
How do I use TinyMCE in my own module?
I want the user to be able to type in rich text content that will be saved in the database for my specific purposes.
-
- 8 Posts
I am working on the same issue myself- building a custom module and I want to use tinyMCE for textareas. Now, I’ve used tinyMCE before, so I know how to call it if I just want to assume the current install directory, however, Modx seems to put it in assets/plugins/tinymce3201, which seems a bit odd and left me thinking that maybe there’s a nifty API which returns the current install directory of the installed tinyMCE. If not, I’ll happily plug-along with hard-coding it, just seems like something that’ll break at some point.
Any clues on whether such an API exists?
- Aaron Anderson
Not that I know of. The plugin is hard-coded.
// Set the name of the plugin folder
$pluginfolder = "tinymce3201";
include_once $modx->config['base_path'].'assets/plugins/'.$pluginfolder.'/tinymce.lang.php';
You can set this in the module’s configuration to make it easier to change.
-
- 3 Posts
Hi,
I too want to have tinymce (or another rte) available in the 'front-part' of my site (not just in the manager). What adaptations do I have to make?
Thnx for your answer in advance.