PageRenderTime 18ms CodeModel.GetById 16ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/EQT_V2/EQT/EQTWebApp/fckeditor/_samples/cfm/sample01_mx.cfm

http://sgsoft-las.googlecode.com/
ColdFusion | 67 lines | 40 code | 5 blank | 22 comment | 1 complexity | cbe8fdff588d085b579c3602795ebca5 MD5 | raw file
Possible License(s): LGPL-2.1
 1<cfsetting enablecfoutputonly="true">
 2<!---
 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 4 * Copyright (C) 2003-2009 Frederico Caldeira Knabben
 5 *
 6 * == BEGIN LICENSE ==
 7 *
 8 * Licensed under the terms of any of the following licenses at your
 9 * choice:
10 *
11 *  - GNU General Public License Version 2 or later (the "GPL")
12 *    http://www.gnu.org/licenses/gpl.html
13 *
14 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15 *    http://www.gnu.org/licenses/lgpl.html
16 *
17 *  - Mozilla Public License Version 1.1 or later (the "MPL")
18 *    http://www.mozilla.org/MPL/MPL-1.1.html
19 *
20 * == END LICENSE ==
21 *
22 * Sample page for ColdFusion MX 6.0 and above.
23--->
24
25<cfoutput>
26<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
27<html>
28<head>
29	<title>FCKeditor - Sample</title>
30	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
31	<meta name="robots" content="noindex, nofollow">
32	<link href="../sample.css" rel="stylesheet" type="text/css" />
33</head>
34<body>
35<h1>FCKeditor - ColdFusion Component (CFC) - Sample 1</h1>
36
37This sample displays a normal HTML form with a FCKeditor with full features enabled.
38<hr>
39
40<form method="POST" action="sampleposteddata.cfm">
41</cfoutput>
42
43<cfif listFirst( server.coldFusion.productVersion ) LT 6>
44	<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>
45	<cfabort>
46</cfif>
47
48<cfscript>
49	// Calculate basepath for FCKeditor. It's in the folder right above _samples
50	basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
51
52	fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
53	fckEditor.instanceName	= "myEditor" ;
54	fckEditor.value			= '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
55	fckEditor.basePath		= basePath ;
56	fckEditor.Create() ; // create the editor.
57</cfscript>
58
59<cfoutput>
60<br />
61<input type="submit" value="Submit">
62<hr />
63</form>
64</body>
65</html>
66</cfoutput>
67<cfsetting enablecfoutputonly="false">