/** * Writes the Stylesheet for the tinyMCE editor */ public function writeStylesheet() { $group = $this->content->getW3sGroup(); $template = $group->getW3sTemplate(); $templateName = strtolower($template->getTemplateName()); $projectName = strtolower($template->getW3sProject()->getProjectName()); $classes = w3sTemplateEngine::findStylesheetClasses($this->content, 1); $css = $this->standardCss; foreach ($classes as $class) { $css .= $class . "\n"; } $handle = fopen(sfConfig::get('sf_web_dir') . sfConfig::get('app_w3s_web_css_dir') . '/w3s_tinymce_stylesheet.css', 'w'); fwrite($handle, $css); fclose($handle); }
protected function drawOptions() { return sprintf($this->optionsSkeleton, __('Set as active class'), select_tag('w3s_assigned_class', options_for_select(w3sTemplateEngine::findStylesheetClasses($this->content), '')), __('Set the class on each page'), checkbox_tag('w3s_class_page_assign', false), __('Assign active class to'), select_tag('w3s_assigned_to', options_for_select(array('li' => __('List [LI]'), 'a' => __('Link [A]')))), __('Use these options to highlight the active link that corresponds to the active page, the user is navigating into.')); }