-
- K.D.

-
Total Posts: 13
Joined: 2008-05-02
|
Já jsem nakonec šel do TinyMCE - podle toho návodu se mi ale nepodařil rozchodit pro články .. pomohl až příspěvek který jsem našel na foru:
/magento/lib/Varien/Data/Form/Element/Editor.php starting from line 45
public function getElementHtml() { if( $this->getWysiwyg() === true ) { $element = ($this->getState() == 'html') ? '' : $this->getHtmlId();
$html = ' <textarea name="'.$this->getName().'" title="'.$this->getTitle().'" id="'.$this->getHtmlId().'" class="textarea '.$this->getClass().'" '.$this->serialize($this->getHtmlAttributes()).' >'.$this->getEscapedValue().'</textarea> <script language="javascript" type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript"> Event.observe(window, \'load\', function() { tinyMCE.init({ mode : "exact", theme : "advanced", elements : "'.$this->getHtmlId().'", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", theme_advanced_resize_horizontal : "true", theme_advanced_resizing : "true", apply_source_formatting : "true", convert_urls : "false", force_br_newlines : "true", doctype : \'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\' }); });
</script>';
$html.= $this->getAfterElementHtml(); return $html; } else { return parent::getElementHtml(); } } [...]
snad to někomu pomůže .. ostatní body jsem dělal podle návodu..
Co mě trošku mrzí u tiny je, že nelze přes něj měnit barvu textu + nefunguje mi v editaci statických bloků.. - kdyby někdo přišel na to jak to rozchodit i tam, nebudu se zlobit
|