ColdFusion"

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.

 
(2 intermediate revisions by one other user not shown)
Line 20: Line 20:
  
 
The editor is now ready to be used. Just open the page in your browser to see it at work.
 
The editor is now ready to be used. Just open the page in your browser to see it at work.
 
NOTE: The steps written above are essential to integrate the FCKeditor in your page. However there are some steps you should take to configure the editor more properly:
 
 
=== Step 3 ===
 
 
FCKeditor comes with a default '''File Browser''' that makes it easy to user to upload files and images to the server, as well as browse the available files for reuse. It is also available a "Quick Upload" feature to quickly upload files and create links for them. This default system is integrated with all server side languages supported by FCKeditor. You just need to make a simple configuration to indicate which one you are using. To do that for ASP.NET, just open the fckconfig.js file in the directory where you have copied the FCKeditor core package. Look for the '''_FileBrowserLanguage''' and '''_QuickUploadLanguage''' entries and set their values to '''cfm''' :
 
<pre>var _FileBrowserLanguage = 'cfm'&nbsp;;
 
var _QuickUploadLanguage = 'cfm'&nbsp;;
 
</pre>
 
You must prepare your site to accept the uploaded files and their relative directory. structure. By default FCKeditor will look for the UserFiles directory in the root of the web site, and place all files there. So, just create that directory.
 
 
Remember to check the editor\filemanager\connectors\cfm\config.cfm file and see if the ColdFusion connector is enabled:
 
<pre>Config.Enabled = true&nbsp;;
 
</pre>
 
=== Step 4 ===
 
 
If you want to change the default user files directory place this code in your page source code:
 
<pre>&lt;cfset request.FCKeditor = StructNew()&gt;
 
&lt;cfset request.FCKeditor.userFilesPath = "/fceditor/NewUserFilesDirectory/"&gt; (or whatever other directory you want to use)
 
</pre>
 
&lt;cfset request.FCKeditor = StructNew()&gt;
 
  
 
=== Sample Code ===
 
=== Sample Code ===
Line 63: Line 42:
 
height="200"
 
height="200"
 
&gt;
 
&gt;
&lt;/form&gt;
 
 
&lt;/body&gt;
 
&lt;/body&gt;
 
&lt;/html&gt;
 
&lt;/html&gt;

Latest revision as of 16:50, 20 February 2008

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

Integration step by step

Step 1

Create a cfm page which will include the following <cfmodule> code:

<cfmodule
template="/fckeditor/fckeditor.cfm"
basePath="/fckeditor/"
instanceName="myEditor"
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
width="100%"
height="200"
>

In the above example, BasePath is set to the URL path to the FCKeditor installation folder.

Step 2

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

Sample Code

<cfsetting enablecfoutputonly="true">
<cfoutput>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<h1>FCKeditor in Coldfusion</h1>
</cfoutput>

<cfmodule
template="/fckeditor/fckeditor.cfm"
basePath="/fckeditor/"
instanceName="myEditor"
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
width="100%"
height="200"
>
</body>
</html>
<cfsetting enablecfoutputonly="false">

Additional information

  • You can find some samples on how to use the editor in the "_samples/cfm" directory. To install the samples, just copy that directory to the _samples directory found in the FCKeditor core package installation.
This page was last edited on 20 February 2008, at 16:50.