Warning: Function get_magic_quotes_gpc() is deprecated in /home/forumbs/public_html/includes/class_core.php on line 1960
شرح تركيب المحرر الافضل fckeditor [الأرشيف] - منتديات بانى ستار

المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : شرح تركيب المحرر الافضل fckeditor



walid_8281500
03-23-2009, 05:17 AM
السلام عليكم ,,,

حبيت اشرح طريقه تركيب محرر جداً ممتاز و يحتوي على خاصيات كثيره الي اسمه fckeditor

لزياره موقع المحرر: http://www.fckeditor.net/

مثال للمحرر: http://www.fckeditor.net/demo

قم بتحميل اخر نسخه من المحرر من هنا

http://sourceforge.net/project/downl...itor_2.5.1.zip (http://sourceforge.net/project/downloading.php?group_id=75348&filename=FCKeditor_2.5.1.zip)


بعد التحميل فك الضفط عن الملف المضغوط

و قم بنقل مجلد fckeditor الى سكربتك و لنفرض مجلد ال admin

بحيث يصبح على هذا الشكل





admin/fckeditor/



الان هناك طريقتان لربط المحرر

1) عن طريق php




<?php
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('test') ;
$oFCKeditor->****Path = 'fckeditor/' ;
$oFCKeditor->Value = 'النص المراد اظهاره عند بدايه تشغيل المحرر' ;
$oFCKeditor->Create() ;
?>

test يشير الى اسم ال form
fckeditor/ يشير الى مجلد المحرر

مثال صفحه html:



<?php
include_once("fckeditor/fckeditor.php") ;
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="****/html; charset=utf-8">
</head>
<body>
<form action="sampleposteddata.php" method="post" target="_blank">
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->****Path = '/fckeditor/' ;
$oFCKeditor->Value = '<p>This is some <strong>sample ****</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

2) عن طريق **********

قم باضافه هذا الكود في منطقه head في صفحه html




<link href="fckeditor/_samples/sample.css" rel="stylesheet" type="****/css" />
<****** type="****/**********" src="fckeditor/fckeditor.js"></******>


قم باضافه هذا الكود في المكان المراد ظهور المحرر به




<p style="****-align: right"><****** type="****/**********">
<!--
// Automatically calculates the editor **** path ****d on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.****Path = '/fckeditor/' ; // '/fckeditor/' is the default value.
var s****Path = 'fckeditor/' ;

var oFCKeditor = new FCKeditor( 'article' ) ;
oFCKeditor.****Path = s****Path ;
oFCKeditor.Height = 300 ;
oFCKeditor.Value = 'اكتب المقال هنا' ;
oFCKeditor.Create() ;
//-->
</******>

حقيقه اني افضل استخدام php افضل من الجافاسكربت

المهم بالاخير القرار قرارك

شكراً لكم....