Saturday 27 October 2012

How to use FCKEditor in PHP

How to use FCKEditor in PHP

To use fckeditor in your webpage. Download it from given address. Include the fckeditor.php file in your webpage where you want to include fckeditor interface. and simply type the given code in the form.

When you submit the form the data would be stored in "fieldname" variable in this given code. You can customize the toolbars by editing fckeditor/fckconfig.js file

Download fckeditor from http://sourceforge.net/projects/fckeditor/files/FCKeditor/2.6.6/FCKeditor_2.6.6.zip/download

 <form method="post" name="ck">
 
 <?php
 BasePath = '/website/pathtofckeditor/';
 $FCKeditor->Value = 'default value';
 $FCKeditor->ToolbarSet = "MyToolbar";
 $FCKeditor->Width = '600px';
 $FCKeditor->Height = '200px';
 $FCKeditor->Create();
 ?>
 
 <input type="submit" name="submit" value="Submit" />
 </form>

Your value will be stored in 'fieldname' variable

No comments:

Post a Comment