Hi all,
I’ve installed in my modx revolution the package tinymce and now I would like to use that in my module.
Please could you tell me how I call the package tinymce in my file?
Thanks
Make sure in the MODx settings that TinyMCE is chosen for your Rich Text Editor.
Also, make sure that any TV’s you’ve created are Rich Text.
I create a module in the modx and in that module I have fields for the user fill and I would like that the fields was in tinymce.
How I add tinymce in my php file?
On the last version of the modx I used the code below:
// Get access to template variable function (to output the RTE)
include_once($modx->config[’base_path’].’manager/includes/tmplvars.inc.php’);
$event_output = $modx->invokeEvent("OnRichTextEditorInit", array(’editor’=>$modx->config[’which_editor’], ’elements’=>array(’tvmailMessage’)));
if(is_array($event_output)) {
$editor_html = implode("",$event_output);
}
// Get HTML for the textarea, last parameters are default_value, elements, value
$rte_html = renderFormElement(’richtext’, ’mailMessage’, ’’, ’’, $newsletter);
echo $rte_html;
echo $editor_html;