/** * Method to handle the onInit event. * - Initializes the JCE WYSIWYG Editor * * @access public * @param $toString Return javascript and css as a string * @return string JavaScript Initialization string * @since 1.5 */ public function onInit() { $app = JFactory::getApplication(); $language = JFactory::getLanguage(); $document = JFactory::getDocument(); // set IE mode //$document->setMetaData('X-UA-Compatible', 'IE=Edge', true); // Check for existence of Admin Component if (!is_dir(JPATH_SITE . '/components/com_jce') || !is_dir(JPATH_ADMINISTRATOR . '/components/com_jce')) { JError::raiseWarning('SOME_ERROR_CODE', 'WF_COMPONENT_MISSING'); } $language->load('plg_editors_jce', JPATH_ADMINISTRATOR); $language->load('com_jce', JPATH_ADMINISTRATOR); // load constants and loader require_once JPATH_ADMINISTRATOR . '/components/com_jce/includes/base.php'; wfimport('admin.models.editor'); $model = new WFModelEditor(); return $model->buildEditor(); }