If you’re developing your own content management system in PHP – you definitely need to choose a good rich text editor. ‘FCKEditor – the text editor for the internet’ will be my recommendation (and Mustafa’s too!)

It is one of the best editor’s available in PHP. It is also available in other languages like ASP.net but since we’ve been working with PHP, I’ll be talking about the PHP version.

How we got to it? Working for a client, we needed a solution to help our client ‘upload’ images to the text editor directly from the text editor itself. Considering a client who knows little about the internet, we had to assume that the person does not know how to upload images elsewhere or even manually on his server to include in the text by entering the image location as a URL.

FCKEditor has a built-in image uploader that served exactly our purpose!

The installation is pretty simple:

1) You can download FCKeditor form here: fckeditor_26.zip

2) Extract and place the files at a convenient location on your web server. Basic settings are placed in the file ‘fckconfig.js’, you really don’t have to mess with these settings unless you really have to, or want to…

3) The basic integration into your web page is pretty simple and well explained in the FCKeditor documentation. Here’s an example:

<!– Include the basic integration module: –>

<?php
include_once(“fckeditor/fckeditor.php”) ;
?>
<html>
<head>
<title>Ammar360.com : Including Editor in Web Page</title>
</head>
<body>

<!– including the editor in a FORM –>

<form action=”posteddata.php” method=”post” target=”_blank”>
<?php
$oFCKeditor = new FCKeditor(‘myeditorname’) ;
$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>

The editor will behave like a normal <INPUT> field in a form. It will use the name you’ve used when creating it (in the above sample, “myeditorname”).

Here you go, your editor should be up and running!

Like I’ve gone through the documentation and further available reading material at the official website, you too can pay it a visit and go through other details at http://www.fckeditor.net