kinday Posted May 15, 2008 Report Share Posted May 15, 2008 Hallo, ich versuche gerade einen neuen WYSIWYG Editor im Admin Interface einzubauen, da der alte Fehlerhaft ist und nicht alles korrekt ausführt. Ich möchte den InnovaEditor nutzen. Leider komme ich einfach nicht weiter. Hier mein Versuch(xtc_wysiwyg.inc.php): $js_src = "http://www.xtadmin.de/xtc/editor/script/innovaeditor.js"; switch($type) { // WYSIWYG editor content manager textarea named cont case 'content_manager': $val ='<script type="text/javascript" src="'.$js_src.'"></script>'; break; case 'content_manager1': $val ='<script type="text/javascript"> window.onload = function() { var oEdit = new InnovaEditor("oEdit"); oEdit.width="100%"; oEdit.height=550; oEdit.features=["FullScreen","Preview","Print", "Search","SpellCheck","|", "Superscript","Subscript","|","LTR","RTL","|", "Table","Guidelines","Absolute","|", "Flash","Media","|", //"InternalLink","CustomObject","|", "Form","Characters","ClearAll", //"XHTMLFullSource", "XHTMLSource","BRK", "Cut","Copy","Paste","PasteWord","PasteText","|", "Undo","Redo","|","Hyperlink","Bookmark","Image","|", "JustifyLeft","JustifyCenter","JustifyRight","JustifyFull","|", "Numbering","Bullets","|","Indent","Outdent","|", "Line","RemoveFormat","BRK", "StyleAndFormatting","TextFormatting","ListFormatting", "BoxFormatting","ParagraphFormatting","CssText","Styles","|", //"CustomTag", "Paragraph","FontName","FontSize","|", "Bold","Italic","Underline","Strikethrough","|", "ForeColor","BackColor"]; oEdit.css="'.$css_src.'"; oEdit.cmdAssetManager = "modalDialogShow(\''.$manager.'\',640,465)"; //Command to open the Asset Manager add-on. oEdit.cmdInternalLink = "modelessDialogShow(\'links.htm\',365,270)"; //Command to open your custom link lookup page. oEdit.cmdCustomObject = "modelessDialogShow(\'objects.htm\',365,270)"; //Command to open your custom content lookup page. oEdit.arrCustomTag=[["First Name","{%first_name%}"], ["Last Name","{%last_name%}"], ["Email","{%email%}"]];//Define custom tag selection oEdit.customColors=["#ff4500","#ffa500","#808000","#4682b4","#1e90ff","#9400d3","#ff1493","#a9a9a9"];//predefined custom colors oEdit.mode="XHTMLBody"; //Editing mode. oEdit.REPLACE("cont"); } </script>'; break; }[/PHP] Ich habe hier 2 case machen müssen, der eine wird im HEAD geladen und der zweite muß nach der TEXTAREA geladen werden. Leider wird er nicht angezeigt! Wenn ich die Zeile window.onload = function() { aus kommentiere dann ist er endlich da, aber das ist ja nicht der Sinn! Bei den Alten FCKEditor ist die window.onload = function() { auch vorhanden. Meine Speicherung nimmt er auch nicht an. Hier mein Versuch(html_output.php): [PHP]function xtc_draw_textarea_field($name, $wrap, $width, $height, $text = '', $params = '', $reinsert_value = true) { $field = '<textarea id="'.$name.'" name="' . $name . '" wrap="' . $wrap . '" cols="' . $width . '" rows="' . $height . '"'; if ($params) $field .= ' ' . $params; $field .= '>'; /* function encodeHTML($sHTML) { $sHTML=ereg_replace("&","&",$sHTML); $sHTML=ereg_replace("<","<",$sHTML); $sHTML=ereg_replace(">",">",$sHTML); return $sHTML; } if(isset($text)) { $sContent=stripslashes($text); $text .= encodeHTML($sContent); } */ if ( ($GLOBALS[$name]) && ($reinsert_value) ) { $field .= $GLOBALS[$name]; } elseif ($text != '') { $field .= $text; } $field .= '</textarea>'; return $field; }[/PHP] Habe beide Varianten probiert, aber nichts... Kann mir vielleicht jemand weiterhelfen, damit ich es endlich zum laufen bekomme! Vielen Dank Link to comment Share on other sites More sharing options...
Vio Posted May 15, 2008 Report Share Posted May 15, 2008 Hallo, ich denke, so einfach wird das nicht werden. Hast Du schon mal das Update auf den fckeditor 2,6 probiert: http://www.xt-commerce.com/forum/showthread.php?t=61114 Grüße Vio Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.