How can I insert TinyMCE into module code?
-
☆ A M B ☆
- 24,524 Posts
Here’s the code that makes the KoopsMailinglistX module use the default MODx manager’s RTE (see
this post and a few more posts on the subject further up the list of that topic)
echo '<div class="content_">
<form action="index.php?a=112&id='.$modId.'&p=2" method="post"><b>
'.$l_subject.':</b><br/><input type="text" size="50" maxlength="50" name="subject"></input>
<br/><br/>'.$l_firefoxproblem.'<br/><br/> ';
// 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', '', '', '');
echo $rte_html;
echo $editor_html;
echo '<br />
<input type="submit" value="'.$l_submit.'"></input>
</form></div>';
Hey all,
I really need TinyMCE and all its features into my module including filebrowser, etc.
I saw that a lot of topics was started about this but the most are unreplyed.
So, if someone know it, please let me know. The above examples don’t work for me. I’ve looked in de code of Modx but I found nothing what I can use.
Thanks in advance,
PH-MJS