'."\n"; $st .= ' '."\n"; return $st; } public static function getHandledDataType() { return 'html'; } public function resetCSSClass() { $this->setCSSClass('html'); } public function generate($parent) { $id = $this->getID(); $name = $this->getName(); $css = $this->getCSSClass(); $value = $this->getValue(); $instanceName = \MCMS\System::getInstance()->getTarget('instance'); $baseDir = implode('/',array(_COMURLX_,'editor','html','tinymce','_js_',self::VERSION)).'/'; /* tinyMCE.init({ // General directionality: "ltr", editor_selector : "mce_editable", language : "en", mode : "specific_textareas", skin : "default", theme : "advanced", // Cleanup/Output inline_styles : true, gecko_spellcheck : true, cleanup : true, cleanup_on_startup : false, entity_encoding : "raw", extended_valid_elements : "hr[id|title|alt|class|width|size|noshade|style],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],a[id|class|name|href|target|title|onclick|rel|style]", force_br_newlines : false, force_p_newlines : true, forced_root_block : 'p', invalid_elements : "script,applet,iframe", // URL relative_urls : true, remove_script_host : false, document_base_url : "http://localhost/tests/joomla-1.6.5/", // Layout content_css : "http://localhost/tests/joomla-1.6.5/templates/system/css/editor.css", // Advanced theme theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_source_editor_height : "550", theme_advanced_source_editor_width : "750", theme_advanced_resizing : true, theme_advanced_resize_horizontal : false, theme_advanced_statusbar_location : "bottom", theme_advanced_path : true }); */ $cssfile = false; $system = \MCMS\System::getInstance(); $db = $system->getDB(); $site = $db->getObject ("SELECT * FROM websites WHERE id=".$system->getSiteId()); $this->layout = $system->getSiteParam($system->getSiteId(), '', 'layout', 'default'); $filebase = __DS__.$this->layout.__DS__; $urlbase = '/'.$this->layout.'/'; $paths = array( array(_LAYOUTPATHX_.$filebase.'css'.__DS__.'editor.css',_LAYOUTURLX_.$urlbase.'css/editor.css'), array(_LAYOUTPATHX_.$filebase.'editor.css',_LAYOUTURLX_.$urlbase.'editor.css'), array(_LAYOUTPATH_.$filebase.'css'.__DS__.'editor.css',_LAYOUTURL_.$urlbase.'css/editor.css'), array(_LAYOUTPATH_.$filebase.'editor.css',_LAYOUTURL_.$urlbase.'editor.css'), array(_LAYOUTPATH_.__DS__.'default'.__DS__.'editor.css',_LAYOUTURL_.'/default/editor.css') ); foreach ($paths as $csspath) { if (file_exists($csspath[0])) { $cssfile = $csspath[1]; break; } } $langAdd = ''; if (file_exists(implode(__DS__, array(__DIR__,'_js_',self::VERSION,'langs',$system->getActiveLocale().'.js')))) $langAdd = 'language : "'.$system->getActiveLocale().'",'; $st = ''; $st .= ''; return array('html' => $st, 'js_import' => array($baseDir.self::FILENAME)); } }