내 사이트 중 하나에 TinyMCE에를 사용하고 있는데 나는이 때문에 편집기를 사용하는 나의 바보 같은 결정을 전체 사이트를 삭제하려는 지점에 도달했습니다.TinyMCE는 텍스트가 아닌 이미지를 업데이트 할 수 있습니다. 이유는 무엇입니까?
로그인 할 때 TinyMCE는 때로는 자신의 삶을 살아가는 것을 제외하면 모든 것이 매력처럼 작동하지만 이미지를 업데이트/대체하려는 경우 전혀 아무 것도하지 않습니다. TinyMCE 미리보기 편집기에서 모든 것이 훌륭하게 보이지만 데이터베이스에 저장하면 아무 일도 일어나지 않습니다.
사람이 될 수있는 것을 알고 있나요?
<?php
if($isadmin) {?>
<form method="post" action="dump.php?id=2">
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
<?php } ?>
<?php echo $row[1]; ?>
<?php
if($isadmin) {?>
</textarea>
<br />
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
<?php } ?>
을 그리고 여기 TinyMCE를 실행하는 데 사용하는 코드는 다음과 같습니다 :
여기에 코드 TinyMCE에 내가 편집하고있을 때 사용하고있다 :
는사전
에 편집 감사<?php
session_start();
ob_flush();
require_once ("include/config.php");
if(isset($_SESSION['admin_user']) && isset($_SESSION['admin_password'])){
$isadmin = true;
}else{
$isadmin = false;
}
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die("Failed to connect");
mysql_select_db($dbname) or die("cant access");
// id=4 är sidan 4
$result = mysql_query("SELECT * FROM content WHERE id=2") or die("couldn't select data");
$row = mysql_fetch_row($result);
?>
<?php
if($isadmin) {?>
<!-- TinyMCE -->
<script type="text/javascript" src="admin/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "autolink,lists,spellchecker,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",
// 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,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Skin options
skin : "o2k7",
skin_variant : "silver",
// Example content CSS (should be your site CSS)
content_css : "css/example.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "js/template_list.js",
external_link_list_url : "js/link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<?php
}
?>
서버 측 스크립트에서 어떤 유형의 필터도 수행하지 않습니까? 당신의 tinymce 편집기에 의해 게시 된 $ _POST 데이터 중 일부를 붙여 넣을 수 있습니까? – Cristian
너무 모호한 코드 ... 필요합니다 ... 코드 – mcgrailm
종종 구현 자체가 결함이며 소프트웨어 자체는 아닙니다. TinyMCE는 환상적인 도구이며 수년간 사용해 왔습니다. "아무 일도 일어나지 않는다", 확실한가요? 아무것도? 소스 또는 DB에서 img 코드를 볼 수 있지만 이미지 자체가 표시되지 않습니까? –