PHP"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(New page: It is very easy to use FCKeditor in your php web pages. Just follow these steps. == Integration step by step == === Step 1 === The first thing to do is to include the "PHP Integration M...)
 
Line 22: Line 22:
 
?>
 
?>
 
</pre>  
 
</pre>  
"FCKeditor1" is the name used to post the editor data on forms.
+
=== Step 3 ===
 +
 
 +
The editor is now ready to be used. Just open the page in your browser to see it at work.
 +
 
 +
=== Sample Code ===
 +
<pre>&lt;?php
 +
include("fckeditor/fckeditor.php")&nbsp;;
 +
?&gt;
 +
&lt;html&gt;
 +
&lt;head&gt;
 +
&lt;title&gt;FCKeditor - Sample&lt;/title&gt;
 +
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
 +
&lt;/head&gt;
 +
&lt;body&gt;
 +
&lt;?php
 +
 
 +
 
 +
$oFCKeditor = new FCKeditor('FCKeditor1')&nbsp;;
 +
$oFCKeditor-&gt;BasePath = '/fckeditor/'&nbsp;;
 +
$oFCKeditor-&gt;Value = '&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;'&nbsp;;
 +
$oFCKeditor-&gt;Create()&nbsp;;
 +
?&gt;
 +
 
 +
&lt;/form&gt;
 +
&lt;/body&gt;
 +
&lt;/html&gt;
 +
</pre>
 +
<br> "FCKeditor1" is the name used to post the editor data on forms.

Revision as of 10:47, 8 January 2008

It is very easy to use FCKeditor in your php web pages. Just follow these steps.

Integration step by step

Step 1

The first thing to do is to include the "PHP Integration Module" file in the top of your page as in the example below:

<?php
include("fckeditor/fckeditor.php") ;
?>

Of course the include path refers to the place where you have installed your FCKeditor.

Step 2

Now the FCKeditor is available and ready to use. So, just insert the following code in your page to create an instance of the editor inside a <FORM>:

<?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() ;
?>

Step 3

The editor is now ready to be used. Just open the page in your browser to see it at work.

Sample Code

<?php
include("fckeditor/fckeditor.php") ;
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?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() ;
?>

</form>
</body>
</html>


"FCKeditor1" is the name used to post the editor data on forms.