2012-07-01 3 views
1

나는 tinymce 편집기를 처음 사용합니다. 웹 사이트에 따르면 설치가 매우 쉽고 잘 작동합니다. 그러나 PHP에서 수신 할 때.tinymce가 PHP에서 작동하지 않습니까?

<script type="text/javascript" src="http://localhost/tiny_mce/jquery.tinymce.js"></script> 

<script type="text/javascript"> 
$().ready(function() { 
    $('textarea').tinymce({ 
     // Location of TinyMCE script 
     script_url : 'http://localhost/tiny_mce/tiny_mce.js', 

     // General options 
     theme : "advanced", 
     plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist", 

     // Theme options 
     theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", 
     theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", 
     theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", 
     theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,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> 

텍스트 영역이

<textarea id="f_page_body" name="f_page_body" class="tinymice"></textarea> 

PHP 코드가

$body = $_POST["f_page_body"]; 


     echo(stripslashes($body)); 
편집기가 잘 보이는에서

하지만 PHP에 표시이다 : 그것은이 HTML 코드 불완전 코드

를 가져옵니다 다음과 같이 완전한 코드로 표시됩니다.

<p><span xx-large; font-family: impact,chicago; color: #99cc00;">I am testing it</span></p> 
+1

인가 당신이 출력 전에'f_page_body'POST 값으로하는 모든 일? 나는 당면한 문제가 명백하다고 생각하지만, 우리가보고있는 것을 더 이상하지 않으면, PHP가 아니라 TinyMCE의 문제라고 생각합니다. –

+0

예, 모두 2 줄입니다. – user1494854

+2

이 경우, 원래 TinyMCE로 보내 졌던 것이 었습니다 (고장 났을 수도 있지만 검토 할 필요가 없습니다). 또는 TinyMCE가 POST에서 전송되기 전에 마크 업을 무시하고 있습니다. 새 코드가있는 테스트 페이지를 설정하고 간단한 설정으로 작동하는지 확인한 다음 문제점을 발견 할 때까지 각 사용자 정의/고급 추가 기능을 다시 추가하십시오. 작동하면 원본으로 전송할 수 있습니다 당신이 지금 가지고있는 위치. –

답변

0

TinyMCE 편집기를 표시하는 범위에 대해 style = "font-size : 부분은 어디에 있습니까? 어떻게 든 잘린 것처럼 보입니다.

귀하의 HTML :

<p><span xx-large; font-family: impact,chicago; color: #99cc00;">I am testing it</span></p> 

무엇을해야입니다 :

<p><span style="font-size: xx-large; font-family: impact,chicago; color: #99cc00;">I am testing it</span></p> 
+0

예, 당신이 말한 것처럼 말입니다.하지만 오지 않아야합니다. – user1494854

관련 문제