1
我是新來的這個FCKeditor,我使用下面提到的代碼,我在文本編輯器中格式化文本,並使用echo語句顯示相同的文本,但它只顯示純文本(沒有格式)如何使用格式化語法顯示文本。請指導我.thanks提前如何使用php添加FCKeditor
<?php
include("fckeditor.php");
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = substr($sBasePath, 0, strpos($sBasePath, "_samples")) ;
$oFCKeditor = new FCKeditor('FCKeditor') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Value = $ing ;
$oFCKeditor->Create() ;
?>
<html>
<head>
<title>Editor</title>
</head>
<body>
<form name="frmedit" id = "frmedit" method="post" enctype="multipart/form-data">
Title : <input type="text" name="txttitle" id = "txttitle">
<br>
<br>
<input type="submit" name="subsubmit" id="subsubmit" value="SUBMIT">
</form>
</body>
</html>
<?php
if($_POST["subsubmit"]=="SUBMIT"){
$part2 = $_POST["FCKeditor"];
echo $part2;
}
?>
非常感謝您的回覆,我看到鏈接我遵循該鏈接給出的指示。使用$ _POST [「FCKeditor」]聲明,我得到了文本。但是,如果我想存儲在數據庫中的文本爲此,我需要的語法 – Meena 2010-09-06 07:52:31
例如:如果我將文本 - >處理使用編輯器粗體斜體。在回聲聲明它必須顯示像這樣治療 。 IT是可能的 – Meena 2010-09-06 07:54:44
@Meena,我已經更新了我的答案和代碼。現在閱讀答案。 – shamittomar 2010-09-06 11:55:52