. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ //XmlForm_Field_DVEditor /** * XmlForm_Field_HTML class definition * It is useful to see dynaforms how are built * * @package gulliver.system * @author * * @copyright (C) 2012 by Colosa Development Team. * */ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field { //public $toolbarSet = ''; public $width = '100%'; public $height = '300'; public $defaultValue = '
'; public $editorType = ''; /** * render function is drawing the dynaform * * @author * * * @access public * @param string $value * @param string $owner * @return string * */ public function render ($value, $owner = null) { $value = ($value == '') ? '
' : $value; $html = ""; return $html; } /** * attachEvents method executes javascript code in order to initialize * the component configuration, attributes, and additional stuff. * * @author * * * @access public * @param string $element * @return string * */ public function attachEvents ($element) { //cleaning the conflictive prototype functions $editorDefinition = ''; switch ($this->editorType){ case 'EMAIL_TEMPLATE': $editorDefinition = ' // delete Array.prototype.toStr; // delete Object.prototype.toStr; // delete Object.prototype.concat; // delete Object.prototype.get_by_key; // delete Object.prototype.expand; // delete Object.prototype.setParent; // delete Object.prototype.isset_key; tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce" tinyMCE.init({ theme : "advanced", plugins : "fullpage", mode : "specific_textareas", editor_selector : "tmceEditor", width : "640", height : "300", theme_advanced_buttons3_add : "fullpage" }); '; break; case 'OUTPUT_DOCUMENT': $editorDefinition = 'alert("outputdoc")'; break; case 'DYNAFORM_TEMPLATE': $editorDefinition = 'alert("dynaform")'; break; default: $editorDefinition = ' // delete Array.prototype.toStr; // delete Object.prototype.toStr; // delete Object.prototype.concat; // delete Object.prototype.get_by_key; // delete Object.prototype.expand; // delete Object.prototype.setParent; // delete Object.prototype.isset_key; tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce" tinyMCE.init({ theme : "advanced", plugins : "fullpage", mode : "specific_textareas", editor_selector : "tmceEditor", width : "640", height : "300", theme_advanced_buttons3_add : "fullpage" }); '; break; } return $editorDefinition; } }