1
<cfsetting enablecfoutputonly="true">
3
* FCKeditor - The text editor for internet
4
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
6
* Licensed under the terms of the GNU Lesser General Public License:
7
* http://www.opensource.org/licenses/lgpl-license.php
9
* For further information visit:
10
* http://www.fckeditor.net/
12
* "Support Open Source software. What about a donation today?"
14
* File Name: sample02_mx.cfm
15
* Sample page for ColdFusion MX.
18
* Hendrik Kramer (hk@lwd.de)
19
* Wim Lemmens (didgiman@gmail.com)
23
* You must set the url path to the base directory for your media files (images, flash, files)
24
* The best position for this variable is in your Application.cfm file
26
* Possible variable scopes are:
27
* <cfset APPLICATION.userFilesPath = "/UserFiles/">
29
* <cfset SERVER.userFilesPath = "/UserFiles/">
31
* <cfset request.FCKeditor.userFilesPath = "/UserFiles/">
33
* <cfset application.FCKeditor.userFilesPath = "/UserFiles/">
35
* <cfset server.FCKeditor.userFilesPath = "/UserFiles/">
37
* Note #1: Do _not_ set the physical directory on your server, only a path relative to your current webroot
38
* Note #2: Directories will be automatically created
42
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
45
<title>FCKeditor - Sample</title>
46
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
47
<meta name="robots" content="noindex, nofollow">
48
<link href="../sample.css" rel="stylesheet" type="text/css" />
51
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
53
This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.<br>
54
ColdFusion is a registered trademark and product of <a href="http://www.macromedia.com/software/coldfusion/" target="_blank">Macromedia, Inc</a>.
57
<form method="POST" action="#cgi.script_name#">
60
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
61
<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>
66
// Calculate basepath for FCKeditor. It's in the folder right above _samples
67
basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
69
fckEditor = createObject("component", "#basePath#fckeditor");
70
fckEditor.instanceName = "myEditor";
71
fckEditor.value = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
72
fckEditor.basePath = basePath;
73
fckEditor.width = "100%";
74
fckEditor.height = 300;
75
fckEditor.create(); // create the editor.
80
<input type="submit" value="Submit">
86
label="Dump of FORM Variables"
89
<cfoutput></form></body></html></cfoutput>
91
<cfsetting enablecfoutputonly="false">
b'\\ No newline at end of file'