![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 21 Pomógł: 0 Dołączył: 9.04.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
problem jest dosc banalny ale nie moge sobie poradzic. jak w TinyMce wprowadzic kod php (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) jak wprowadzam "<?" to edytor od razu to kompiluje na inne znaki... czytalem o pluginie do tinyMce ktory zezwala wpisywanie kodu: zastosowalem wskazowki stad tutaj i mam: Kod <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "[b]php[/b],safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,ies ell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,pa te,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,temp ate", [b] php_external_list_url : ".zend/public/scripts/tiny_mce/plugins/php/examples/example_php_list.js",[/b] // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justify enter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselec ", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outd nt,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|, nsertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespe l,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acron m,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/content.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); </script> <!-- /TinyMCE --> Widze ze nikt nie spotkal sie z takim problem... w kazdym razie sam juz go rozwiazalem i zamieszczam rozwiazanie dla potomnych kod z textarea z tinymce trzeba przed zapisem (do bazy lub pliku) poddac drobnym modyfikacjom Oto kod //zamiana na php $t = explode("<",$tresc); $ilosc = count($t); for($i=0; $i<$ilosc; $i++){ if(($ilosc-1)==$i){$pom="";}else{$pom="<";} $nowa_tresc.=$t[$i].$pom; } $t = explode(">",$nowa_tresc); $ilosc = count($t); for($i=0; $i<$ilosc; $i++){ if(($ilosc-1)==$i){$pom="";}else{$pom=">";} $nowa_tresc2.=$t[$i].$pom; } |
|
|
![]() ![]() |
![]() |
Aktualny czas: 23.08.2025 - 02:13 |