fckeditor

samrand_7

New Member
سلام خسته نباشید .
من از fckeditor استفاده میکنم .مشکلی که دارم می خواهم در پایگاه داده ذخیرش کنم .
نمی دونم چجوری می شه :
من یک فیلد از نوع ntext درست کردم . فقط چون editor از کلاس استفاده میکنه نمی دونم چه جوری ذخیرش کنم .البته من صفجه را include کردم , کد مثالی که همراه خود برنامست را زیر می نویسم و ممنون میشم کمکم کنید ,خیلی ضروریه!!!!!!!!!!!

کد صفحه شامل editor :
<?php
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = $sBasePath ;
if ( isset($_GET['Lang']) )
{
$oFCKeditor->Config['AutoDetectLanguage'] = false ;
$oFCKeditor->Config['DefaultLanguage'] = $_GET['Lang'] ;
}
else
{
$oFCKeditor->Config['AutoDetectLanguage'] = true ;
$oFCKeditor->Config['DefaultLanguage'] = 'fa' ;
}
$oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
$oFCKeditor->Create() ;
?> <br>
<input type="submit" value="ارسال">
</form>
کد مربوط به صفحه ای که اطلاعات به آن post می شه :
<table border="1" cellspacing="0" id="outputSample">
<colgroup><col width="80"><col></colgroup>
<thead>
<tr>
<th>Field Name</th>
<th>Value</th>
</tr>
</thead>
<?php
if ( isset( $_POST ) )
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
else
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
foreach ( $postArray as $sForm => $value )
{
if ( get_magic_quotes_gpc() )
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
else
$postedValue = htmlspecialchars( $value ) ;
?>
<tr>
<th><textarea name="text" style="background-color:#0CF" ><?php echo $sForm?></textarea></th>
<td><textarea name="text" style="background-color:#0CF"><?php echo $postedValue?></textarea>
</td>
</tr>
<?php
}
?>
</table>
به نظر شما editor راحتتری می شناسید , چون این دردسرش خیلی زیاده و خیلی کامل ؟
نظرتون چیه ؟
 

جدیدترین ارسال ها

بالا