/** * singleton to add markdown config * @return bool */ protected function _addMarkDownConfig() { if ($this->_configInserted === TRUE) { return $this->_configInserted; } $config = array(); $config['dt'] = $this->_helper->getDetectionTag(TRUE); $config['fuu'] = $this->_helper->getAdminFileUploadUrl(); // file upload url /** * when rendering via marked.js include that place holder ... if rendere via PHP replace {{media url...}} * with the real image. */ $config['phi'] = Mage::getBaseUrl('media'); if ($this->_isMarkdownExtra()) { $config['eru'] = $this->_helper->getAdminRenderUrl(array('markdownExtra' => 1)); // extra renderer url } $config['stores'] = $this->_helper->getStoreCodes(); $config['eeloc'] = $this->_helper->isEpicEditorLoadOnClick(); $config['hideIIB'] = $this->_helper->isHiddenInsertImageButton(); $config['mdCss'] = $this->_helper->getMarkdownStyleCss(TRUE); $config['hlCss'] = $this->_helper->getHighLightStyleCss(TRUE); $config['lpUrl'] = $this->_livePreviewUrl; $config['feaBUrl'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'markdown/adminhtml/feature/'; // feature base url (raptor) if ($this->_helper->isReMarkedEnabled() === TRUE) { $config['rmc'] = $this->_helper->getReMarkedConfig(); } $this->_afterElementHtml[1000] = '<div id="markdownGlobalConfig" data-config=\'' . Zend_Json_Encoder::encode($config) . '\' style="display:none;"></div>'; $this->_configInserted = TRUE; return $this->_configInserted; }