*/ class tinyMCE extends tinyMCE_parent { protected function _generateTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet = NULL) { $myConfig = oxRegistry::getConfig(); $aClasses = $myConfig->getConfigParam("aTinyMCE_classes"); //check if tinyMCE is active for this calss if (in_array($this->getClassName(),$aClasses)) { $oViewConf = $this->_aViewData["oViewConf"]; $smarty = oxRegistry::get("oxUtilsView")->getSmarty(); //$sEditor = $smarty->fetch($myConfig->getModulesDir()."hdi/hdi-tinymce/test.tpl"); if ($oObject) { $sInitialValue = ''; if ($oObject->$sField instanceof oxField) { $sInitialValue = $oObject->$sField->getRawValue(); } else { $sInitialValue = $oObject->$sField->value; } //$oObject->$sField = new oxField(str_replace('[{$shop->currenthomedir}]', $myConfig->getCurrentShopURL(), $sInitialValue), oxField::T_RAW); $smarty->assign("sField", $sField); $smarty->assign("iWidth", (strpos($iWidth, '%') === false) ? $iWidth . 'px' : $iWidth); //$smarty->assign("iHeight", "80%"); $smarty->assign( "iHeight", (strpos($iHeight, '%') === false) ? $iHeight . 'px' : $iHeight); $smarty->assign("sContent", $this->_getEditValue($oObject, $sField)); //external plugins & controls $smarty->assign("extPlugins", $myConfig->getConfigParam("aTinyMCE_external_plugins")); $smarty->assign("extControls", $myConfig->getConfigParam("sTinyMCE_external_controls")); //var_dump($myConfig->getModulesDir()."hdi/hdi-tinymce/test.tpl"); $smarty->assign("cfg", $myConfig); $smarty->assign("oViewConf", $this->_aViewData["oViewConf"]); $sEditor = $smarty->fetch("tinymce.tpl"); } return $sEditor; } else { //returning default textarea or whatever return parent::_generateTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet); } } }