السلام عليكم ,,,
حبيت اشرح طريقة طريقه تركيب install محرر جداً ممتاز و يحتوي على خاصيات كثيره الي اسمه fckeditor
لزياره موقع المحرر:
http://www.fckeditor.net/
مثال للمحرر:
http://www.fckeditor.net/demo
قم بتحميل اخر نسخه من المحرر من هنا
http://sourceforge.net/project/downl...itor_2.5.1.zip
بعد التحميل فك الضفط عن الملف المضغوط
و قم بنقل مجلد fckeditor الى سكربتك و لنفرض مجلد ال admin
بحيث يصبح على هذا الشكل
رمز PHP:
<code style="white-space:nowrap"> <code> admin/fckeditor/
</code> </code>
الان هناك طريقتان لربط المحرر
1) عن طريق php
رمز PHP:
<code style="white-space:nowrap"> <code> <?php
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('test') ;
$oFCKeditor->BasePath = 'fckeditor/' ;
$oFCKeditor->Value = 'النص المراد اظهاره عند بدايه تشغيل المحرر' ;
$oFCKeditor->Create() ;
?> </code> </code>
test يشير الى اسم ال form
fckeditor/ يشير الى مجلد المحرر
مثال صفحه html:
رمز PHP:
<code style="white-space:nowrap"> <code> <?php
include_once("fckeditor/fckeditor.php") ;
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form action="sampleposteddata.php" method="post" target="_blank">
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '/fckeditor/' ;
$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="Submit">
</form>
</body>
</html> </code> </code>
2) عن طريق javascript
قم باضافه هذا الكود code في منطقه head في صفحه html
رمز PHP:
<code style="white-space:nowrap"> <code> <link href="fckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
</code> </code>
قم باضافه هذا الكود code في المكان المراد ظهور المحرر به
رمز PHP:
<code style="white-space:nowrap"> <code> <p style="text-align: right"><script type="text/javascript">
<!--
// 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.
var sBasePath = 'fckeditor/' ;
var oFCKeditor = new FCKeditor( 'article' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height = 300 ;
oFCKeditor.Value = 'اكتب المقال هنا' ;
oFCKeditor.Create() ;
//-->
</script>
</code> </code>
حقيقه اني افضل استخدام php افضل من الجافاسكربت
المهم بالاخير القرار قرارك
شكراً لكم....