1 | <cfsetting enablecfoutputonly="true">
|
---|
2 | <!---
|
---|
3 | * FCKeditor - The text editor for internet
|
---|
4 | * Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
---|
5 | *
|
---|
6 | * Licensed under the terms of the GNU Lesser General Public License:
|
---|
7 | * http://www.opensource.org/licenses/lgpl-license.php
|
---|
8 | *
|
---|
9 | * For further information visit:
|
---|
10 | * http://www.fckeditor.net/
|
---|
11 | *
|
---|
12 | * "Support Open Source software. What about a donation today?"
|
---|
13 | *
|
---|
14 | * File Name: sample02_mx.cfm
|
---|
15 | * Sample page for ColdFusion MX.
|
---|
16 | *
|
---|
17 | * File Authors:
|
---|
18 | * Hendrik Kramer (hk@lwd.de)
|
---|
19 | * Wim Lemmens (didgiman@gmail.com)
|
---|
20 | --->
|
---|
21 |
|
---|
22 | <!--- ::
|
---|
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
|
---|
25 | *
|
---|
26 | * Possible variable scopes are:
|
---|
27 | * <cfset APPLICATION.userFilesPath = "/UserFiles/">
|
---|
28 | * OR:
|
---|
29 | * <cfset SERVER.userFilesPath = "/UserFiles/">
|
---|
30 | * OR:
|
---|
31 | * <cfset request.FCKeditor.userFilesPath = "/UserFiles/">
|
---|
32 | * OR:
|
---|
33 | * <cfset application.FCKeditor.userFilesPath = "/UserFiles/">
|
---|
34 | * OR:
|
---|
35 | * <cfset server.FCKeditor.userFilesPath = "/UserFiles/">
|
---|
36 | *
|
---|
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
|
---|
39 | :: --->
|
---|
40 |
|
---|
41 | <cfoutput>
|
---|
42 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
43 | <html>
|
---|
44 | <head>
|
---|
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" />
|
---|
49 | </head>
|
---|
50 | <body>
|
---|
51 | <h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
|
---|
52 |
|
---|
53 | This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
|
---|
54 | <hr>
|
---|
55 |
|
---|
56 | <form method="POST" action="#cgi.script_name#">
|
---|
57 | </cfoutput>
|
---|
58 |
|
---|
59 | <cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
---|
60 | <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>
|
---|
61 | <cfabort>
|
---|
62 | </cfif>
|
---|
63 |
|
---|
64 | <cfscript>
|
---|
65 | // Calculate basepath for FCKeditor. It's in the folder right above _samples
|
---|
66 | basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
|
---|
67 |
|
---|
68 | fckEditor = createObject("component", "#basePath#fckeditor");
|
---|
69 | fckEditor.instanceName = "myEditor";
|
---|
70 | fckEditor.value = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
|
---|
71 | fckEditor.basePath = basePath;
|
---|
72 | fckEditor.width = "100%";
|
---|
73 | fckEditor.height = 300;
|
---|
74 | fckEditor.create(); // create the editor.
|
---|
75 | </cfscript>
|
---|
76 |
|
---|
77 | <cfoutput>
|
---|
78 | <br />
|
---|
79 | <input type="submit" value="Submit">
|
---|
80 | <hr />
|
---|
81 | </cfoutput>
|
---|
82 |
|
---|
83 | <cfdump
|
---|
84 | var="#FORM#"
|
---|
85 | label="Dump of FORM Variables"
|
---|
86 | >
|
---|
87 |
|
---|
88 | <cfoutput></form></body></html></cfoutput>
|
---|
89 |
|
---|
90 | <cfsetting enablecfoutputonly="false"> |
---|