38     private $ex_plugins = 
'dropdown,texts,fonts,email,link,xcode,xquote,rmimage,emotions,more,chars';
 
   39     private $ex_buttons = 
'bold,italic,underline,strikeout,separator_t,left,center,right,separator_t,fontsize,font,fontcolor,separator_t,more,bottom,top,separator_b,link,email,xcode,xquote,separator_b,images,emotions,separator_b,chars,page';
 
   48         function __construct($caption, $name, $width=
'100%', $height=
'300px', $default=
'', 
$type=
'', $change=1, $ele=array(
'op')){
 
   55                 $this->_width = $width;
 
   56                 $this->_height = $height;
 
   57                 $this->_default = isset($_REQUEST[$name]) ? $tcleaner->stripslashes($_REQUEST[$name]) : $tcleaner->stripslashes($default);
 
   59         $this->_type = strtolower($this->_type);
 
   60         $this->_change = $change;
 
   68                 $this->_type = $value;
 
   77                 $this->_theme = $theme;
 
   95                 switch ($this->_type){
 
  116                 $rtn = 
"<div class=\"ed-container\" style=\"width: $this->_width\">";
 
  120             $rtn .= 
'<div class="ed-plugins">';
 
  124         $rtn .= 
"<textarea class='xc-editor' id='".$this->getName().
"' name='".$this->
getName().
"' style='width: 99%; height: ".$this->_height.
";'>".$this->_default.
"</textarea> 
  132         $form->tinyCSS(
$url);
 
  144                 RMTemplate::get()->add_local_script(
'quicktags.js',
'rmcommon',
'include');
 
  149                 <div class=\"ed-container\" id=\"ed-cont-".$this->id().
"\" style=\"width: $this->_width\"> 
  150         <div class=\"es-editor\" style=\"width: $this->_width;\"> 
  151         <a class=\"edButtonHTML\" onclick=\"switchEditors.go('".$this->
id().
"', 'html');\">HTML</a> 
  152         <a class=\"edButtonPreview\" onclick=\"switchEditors.go('".$this->
id().
"', 'tinymce');\">Visual</a> 
  154         <div class=\"quicktags\"><script type=\"text/javascript\">edToolbar('".$this->
id().
"')</script></div> 
  155         <textarea onchange=\"tinyMCE.activeEditor.save();\" id='".$this->
id().
"' name='".$this->
getName().
"' style='width: 100%; height: ".$this->_height.
";' class='".$this->
getClass().
"'>".$this->_default.
"</textarea></div>";
 
  166                 $rtn = 
"\n<div class='ed-container html_editor_container' style='width: $this->_width;' id='".$this->id().
"-ed-container'>";
 
  171                 $rtn .= 
"<div class=\"quicktags\"><script type=\"text/javascript\">edToolbar('".$this->id().
"')</script>".(!empty(
$plugins) ? 
"<div class='ed_plugins'>".implode(
" ", 
$plugins).
"</div>" : 
'').
"</div> 
  172                 <div class='txtarea_container'><textarea id='".$this->
id().
"' name='".$this->
getName().
"' style='width: ".$this->_width.
"; height: ".$this->_height.
";' class='".$this->
getClass().
"'>".$this->_default.
"</textarea></div> 
  182                 $rtn =  
"<div class='ed-container' id='".$this->id().
"-ed-container' width='$this->_width'>";
 
  183                 $rtn .= 
"<div class='ed_buttons' id='".$this->id().
"-ec-container'>";
 
  184         $rtn .= 
"<div class='row_top'></div><div class='row_bottom'></div>";
 
  186                 $rtn .= 
"<textarea id='".$this->id().
"' name='".$this->
getName().
"' style='width: 99%; height: ".$this->_height.
";' class='".$this->
getClass().
"'>".$this->_default.
"</textarea>";
 
  189         $tplugins = 
RMEvents::get()->run_event(
'rmcommon.exmcode.plugins', $this->ex_plugins);
 
  190         $tplugins = explode(
',',$tplugins);
 
  192         foreach ($tplugins as 
$p){
 
  195         RMTemplate::get()->add_head(
"<script type=\"text/javascript\">\nvar ".$this->
id().
"_buttons = \"".
RMEvents::get()->run_event(
'rmcommon.exmcode.buttons', $this->ex_buttons).
"\";\nvar ".$this->
id().
"_plugins = {".
$plugins.
"};\n</script>");
 
  205         if ($buttons==
'') 
return;
 
  207         $this->ex_buttons = $buttons;