1
<cfsetting enablecfoutputonly="true">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* Sample page for ColdFusion MX.
26
* You must set the url path to the base directory for your media files (images, flash, files)
27
* The best position for this variable is in your Application.cfm file
29
* Possible variable scopes are:
30
* <cfset APPLICATION.userFilesPath = "/userfiles/">
32
* <cfset SERVER.userFilesPath = "/userfiles/">
34
* <cfset request.FCKeditor.userFilesPath = "/userfiles/">
36
* <cfset application.FCKeditor.userFilesPath = "/userfiles/">
38
* <cfset server.FCKeditor.userFilesPath = "/userfiles/">
40
* Note #1: Do _not_ set the physical directory on your server, only a path relative to your current webroot
41
* Note #2: Directories will be automatically created
45
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
48
<title>FCKeditor - Sample</title>
49
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
50
<meta name="robots" content="noindex, nofollow">
51
<link href="../sample.css" rel="stylesheet" type="text/css" />
54
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
56
This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
59
<form method="POST" action="#cgi.script_name#">
62
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
63
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
68
// Calculate basepath for FCKeditor. It's in the folder right above _samples
69
basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
71
fckEditor = createObject("component", "#basePath#fckeditor");
72
fckEditor.instanceName = "myEditor";
73
fckEditor.value = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
74
fckEditor.basePath = basePath;
75
fckEditor.width = "100%";
76
fckEditor.height = 300;
77
fckEditor.create(); // create the editor.
82
<input type="submit" value="Submit">
88
label="Dump of FORM Variables"
91
<cfoutput></form></body></html></cfoutput>
93
<cfsetting enablecfoutputonly="false">
b'\\ No newline at end of file'