Varien_Data_Form_Element_Editor Class Reference

Inheritance diagram for Varien_Data_Form_Element_Editor:

Varien_Data_Form_Element_Textarea Varien_Data_Form_Element_Abstract Varien_Data_Form_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ($attributes=array())
 getElementHtml ()
 getTheme ()


Detailed Description

Definition at line 34 of file Editor.php.


Constructor & Destructor Documentation

__construct ( attributes = array()  ) 

Enter description here...

Parameters:
array $attributes

Reimplemented from Varien_Data_Form_Element_Textarea.

Definition at line 36 of file Editor.php.

00037     {
00038         parent::__construct($attributes);
00039         if( $this->getWysiwyg() === true )
00040         {
00041             $this->setType('wysiwyg');
00042             $this->setExtType('wysiwyg');
00043         }
00044         else
00045         {
00046             $this->setType('textarea');
00047             $this->setExtType('textarea');
00048         }
00049     }


Member Function Documentation

getElementHtml (  ) 

Reimplemented from Varien_Data_Form_Element_Textarea.

Definition at line 51 of file Editor.php.

00052     {
00053         if( $this->getWysiwyg() === true )
00054         {
00055             $element = ($this->getState() == 'html') ? '' : $this->getHtmlId();
00056 
00057             $html = '
00058                 <textarea name="'.$this->getName().'" title="'.$this->getTitle().'" id="'.$this->getHtmlId().'" class="textarea '.$this->getClass().'" '.$this->serialize($this->getHtmlAttributes()).' >'.$this->getEscapedValue().'</textarea>
00059                 <script type="text/javascript">
00060                 //<![CDATA[
00061                    /* tinyMCE.init({
00062                         mode : "exact",
00063                         theme : "'.$this->getTheme().'",
00064                         elements : "' . $element . '",
00065                         theme_advanced_toolbar_location : "top",
00066                         theme_advanced_toolbar_align : "left",
00067                         theme_advanced_path_location : "bottom",
00068                         extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
00069                         theme_advanced_resize_horizontal : "false",
00070                         theme_advanced_resizing : "false",
00071                         apply_source_formatting : "true",
00072                         convert_urls : "false",
00073                         force_br_newlines : "true",
00074                         doctype : \'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\'
00075                     });*/
00076                 //]]>
00077                 </script>';
00078 
00079                 /*plugins : "inlinepopups,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
00080                 theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
00081                 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
00082                 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
00083                 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking"*/
00084 
00085             $html.= $this->getAfterElementHtml();
00086             return $html;
00087         }
00088         else
00089         {
00090             return parent::getElementHtml();
00091         }
00092     }

getTheme (  ) 

Definition at line 94 of file Editor.php.

00095     {
00096         if(!$this->hasData('theme')) {
00097             return 'simple';
00098         }
00099 
00100         return $this->getData('theme');
00101     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:59 2009 for Magento by  doxygen 1.5.8