Index: /FCKeditor/trunk/_samples/cfm/sample01.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample01.cfm	(revision 696)
+++ /FCKeditor/trunk/_samples/cfm/sample01.cfm	(revision 697)
@@ -1,3 +1,3 @@
-<cfsetting enablecfoutputonly="true" showdebugoutput="false">
+<cfsetting enablecfoutputonly="true">
 <!---
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
@@ -32,17 +32,19 @@
 	<link href="../sample.css" rel="stylesheet" type="text/css" />
 </head>
-
 <body>
-
 <h1>FCKeditor - ColdFusion - Sample 1</h1>
 
-This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Custom Tag / Module.
+This sample displays a normal HTML form with a FCKeditor with full features enabled.
 <hr>
-<form method="POST" action="#cgi.script_name#">
+
+<form method="POST" action="sampleposteddata.cfm">
 </cfoutput>
+
+<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
+<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
 
 <cfmodule
 	template="../../fckeditor.cfm"
-	basePath="#Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1)#"
+	basePath="#basePath#"
 	instanceName="myEditor"
 	value='This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.'
@@ -50,38 +52,12 @@
 	height="200"
 >
+
 <cfoutput>
 <br />
 <input type="submit" value="Submit">
-<br />
+<hr />
 </form>
-</cfoutput>
-
-<cfif isDefined( 'FORM.fieldnames' )>
-	<cfoutput>
-	<hr />
-	<style>
-	<!--
-		td, th { font: 11px Verdana, Arial, Helv, Helvetica, sans-serif; }
-	-->
-	</style>
-	<table border="1" cellspacing="0" cellpadding="2" bordercolor="darkblue" bordercolordark="darkblue" bordercolorlight="darkblue">
-	<tr>
-		<th colspan="2" bgcolor="darkblue"><font color="white"><strong>Dump of FORM Variables</strong></font></th>
-	</tr>
-	<tr>
-		<td bgcolor="lightskyblue">FieldNames</td>
-		<td>#FORM.fieldNames#</td>
-	</tr>
-	<cfloop list="#FORM.fieldnames#" index="key">
-	<tr>
-		<td valign="top" bgcolor="lightskyblue">#key#</td>
-		<td>#HTMLEditFormat(evaluate("FORM.#key#"))#</td>
-	</tr>
-	</cfloop>
-	</table>
-	</cfoutput>
-</cfif>
-
 </body>
 </html>
+</cfoutput>
 <cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample01_mx.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample01_mx.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sample01_mx.cfm	(revision 697)
@@ -0,0 +1,67 @@
+<cfsetting enablecfoutputonly="true">
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page for ColdFusion MX.
+--->
+
+<cfoutput>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="robots" content="noindex, nofollow">
+	<link href="../sample.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<h1>FCKeditor - ColdFusion Component (CFC) - Sample 1</h1>
+
+This sample displays a normal HTML form with a FCKeditor with full features enabled.
+<hr>
+
+<form method="POST" action="sampleposteddata.cfm">
+</cfoutput>
+
+<cfif listFirst( server.coldFusion.productVersion ) LT 6>
+	<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>
+	<cfabort>
+</cfif>
+
+<cfscript>
+	// Calculate basepath for FCKeditor. It's in the folder right above _samples
+	basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
+
+	fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
+	fckEditor.instanceName	= "myEditor" ;
+	fckEditor.value			= 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.' ;
+	fckEditor.basePath		= basePath ;
+	fckEditor.Create() ; // create the editor.
+</cfscript>
+
+<cfoutput>
+<br />
+<input type="submit" value="Submit">
+<hr />
+</form>
+</body>
+</html>
+</cfoutput>
+<cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample02.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample02.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sample02.cfm	(revision 697)
@@ -0,0 +1,110 @@
+<cfsetting enablecfoutputonly="true">
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page for ColdFusion.
+--->
+
+<cfoutput>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="robots" content="noindex, nofollow">
+	<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+
+function FCKeditor_OnComplete( editorInstance )
+{
+	var oCombo = document.getElementById( 'cmbLanguages' ) ;
+	for ( code in editorInstance.Language.AvailableLanguages )
+	{
+		AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
+	}
+	oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
+}
+
+function AddComboOption(combo, optionText, optionValue)
+{
+	var oOption = document.createElement("OPTION") ;
+
+	combo.options.add(oOption) ;
+
+	oOption.innerHTML = optionText ;
+	oOption.value     = optionValue ;
+
+	return oOption ;
+}
+
+function ChangeLanguage( languageCode )
+{
+	window.location.href = window.location.pathname + "?Lang=" + languageCode ;
+}
+		</script>
+</head>
+<body>
+<h1>FCKeditor - ColdFusion - Sample 2</h1>
+This sample shows the editor in all its available languages.
+<hr>
+<table cellpadding="0" cellspacing="0" border="0">
+	<tr>
+		<td>
+			Select a language:&nbsp;
+		</td>
+		<td>
+			<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
+			</select>
+		</td>
+	</tr>
+</table>
+<br>
+<form action="sampleposteddata.cfm" method="post" target="_blank">
+</cfoutput>
+
+<cfset config = structNew()>
+<cfif isDefined( "URL.Lang" )>
+	<cfset config["AutoDetectLanguage"]		= false>
+	<cfset config["DefaultLanguage"]		= HTMLEditFormat( URL.Lang )>
+<cfelse>
+	<cfset config["AutoDetectLanguage"]		= true>
+	<cfset config["DefaultLanguage"]		= 'en'>
+</cfif>
+
+<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
+<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
+
+<cfmodule
+	template="../../fckeditor.cfm"
+	basePath="#basePath#"
+	instanceName="myEditor"
+	value='This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.'
+	width="100%"
+	height="200"
+	config="#config#"
+>
+<cfoutput>
+	<br>
+	<input type="submit" value="Submit">
+	</form>
+</body>
+</html>
+</cfoutput>
+<cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample02_mx.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample02_mx.cfm	(revision 696)
+++ /FCKeditor/trunk/_samples/cfm/sample02_mx.cfm	(revision 697)
@@ -23,23 +23,4 @@
 --->
 
-<!--- ::
-	  * You must set the url path to the base directory for your media files (images, flash, files)
-	  * The best position for this variable is in your Application.cfm file
-	  *
-	  * Possible variable scopes are:
-	  * <cfset APPLICATION.userFilesPath = "/userfiles/">
-	  * OR:
-	  * <cfset SERVER.userFilesPath = "/userfiles/">
-	  * OR:
-	  * <cfset request.FCKeditor.userFilesPath = "/userfiles/">
-	  * OR:
-	  * <cfset application.FCKeditor.userFilesPath = "/userfiles/">
-	  * OR:
-	  * <cfset server.FCKeditor.userFilesPath = "/userfiles/">
-	  *
-	  * Note #1: Do _not_ set the physical directory on your server, only a path relative to your current webroot
-	  * Note #2: Directories will be automatically created
-	  :: --->
-
 <cfoutput>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@@ -50,44 +31,84 @@
 	<meta name="robots" content="noindex, nofollow">
 	<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+
+function FCKeditor_OnComplete( editorInstance )
+{
+	var oCombo = document.getElementById( 'cmbLanguages' ) ;
+	for ( code in editorInstance.Language.AvailableLanguages )
+	{
+		AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
+	}
+	oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
+}
+
+function AddComboOption(combo, optionText, optionValue)
+{
+	var oOption = document.createElement("OPTION") ;
+
+	combo.options.add(oOption) ;
+
+	oOption.innerHTML = optionText ;
+	oOption.value     = optionValue ;
+
+	return oOption ;
+}
+
+function ChangeLanguage( languageCode )
+{
+	window.location.href = window.location.pathname + "?Lang=" + languageCode ;
+}
+		</script>
 </head>
 <body>
 <h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
-
-This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
+This sample shows the editor in all its available languages.
 <hr>
-
-<form method="POST" action="#cgi.script_name#">
 </cfoutput>
-
 <cfif listFirst( server.coldFusion.productVersion ) LT 6>
 	<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>
 	<cfabort>
 </cfif>
+<cfoutput>
+<table cellpadding="0" cellspacing="0" border="0">
+	<tr>
+		<td>
+			Select a language:&nbsp;
+		</td>
+		<td>
+			<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
+			</select>
+		</td>
+	</tr>
+</table>
+<br>
+<form action="sampleposteddata.cfm" method="post" target="_blank">
+</cfoutput>
+	<cfscript>
+		// Calculate basepath for FCKeditor. It's in the folder right above _samples
+		basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
 
-<cfscript>
-	// Calculate basepath for FCKeditor. It's in the folder right above _samples
-	basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
-
-	fckEditor = createObject("component", "#basePath#fckeditor");
-	fckEditor.instanceName	= "myEditor";
-	fckEditor.value			= 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
-	fckEditor.basePath		= basePath;
-	fckEditor.width			= "100%";
-	fckEditor.height		= 300;
-	fckEditor.create(); // create the editor.
-</cfscript>
-
+		fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
+		fckEditor.instanceName	= "myEditor" ;
+		fckEditor.value			= 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.' ;
+		fckEditor.basePath		= basePath ;
+		if ( isDefined( "URL.Lang" ) )
+		{
+			fckEditor.config["AutoDetectLanguage"]		= false ;
+			fckEditor.config["DefaultLanguage"]			= HTMLEditFormat( URL.Lang ) ;
+		}
+		else
+		{
+			fckEeditor.config["AutoDetectLanguage"]		= true ;
+			fckEeditor.config["DefaultLanguage"]		= 'en' ;
+		}
+		fckEditor.create() ; // create the editor.
+	</cfscript>
 <cfoutput>
-<br />
-<input type="submit" value="Submit">
-<hr />
+	<br>
+	<input type="submit" value="Submit">
+	</form>
+</body>
+</html>
 </cfoutput>
-
-<cfdump
-	var="#FORM#"
-	label="Dump of FORM Variables"
->
-
-<cfoutput></form></body></html></cfoutput>
-
 <cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample03.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample03.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sample03.cfm	(revision 697)
@@ -0,0 +1,95 @@
+<cfsetting enablecfoutputonly="true">
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page for ColdFusion.
+--->
+<cfoutput>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+	<head>
+		<title>FCKeditor - Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		<meta name="robots" content="noindex, nofollow">
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+
+function FCKeditor_OnComplete( editorInstance )
+{
+	var oCombo = document.getElementById( 'cmbToolbars' ) ;
+	oCombo.value = editorInstance.ToolbarSet.Name ;
+	oCombo.style.visibility = '' ;
+}
+
+function ChangeToolbar( toolbarName )
+{
+	window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
+}
+
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - ColdFusion - Sample 3</h1>
+		This sample shows how to change the editor toolbar.
+		<hr>
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the toolbar to load:&nbsp;
+				</td>
+				<td>
+					<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
+						<option value="Default" selected>Default</option>
+						<option value="Basic">Basic</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br>
+<form action="sampleposteddata.cfm" method="post" target="_blank">
+</cfoutput>
+
+<cfif isDefined( "URL.Toolbar" )>
+	<cfset toolbarSet = HTMLEditFormat( URL.Toolbar )>
+<cfelse>
+	<cfset toolbarSet = "Default">
+</cfif>
+
+<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
+<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
+
+<cfmodule
+	template="../../fckeditor.cfm"
+	basePath="#basePath#"
+	instanceName="myEditor"
+	value='This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.'
+	width="100%"
+	height="200"
+	toolbarSet="#toolbarSet#"
+>
+
+<cfoutput>
+			<br>
+			<input type="submit" value="Submit">
+		</form>
+	</body>
+</html>
+</cfoutput>
+<cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample03_mx.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample03_mx.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sample03_mx.cfm	(revision 697)
@@ -0,0 +1,95 @@
+<cfsetting enablecfoutputonly="true">
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page for ColdFusion MX.
+--->
+<cfoutput>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+	<head>
+		<title>FCKeditor - Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		<meta name="robots" content="noindex, nofollow">
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+
+function FCKeditor_OnComplete( editorInstance )
+{
+	var oCombo = document.getElementById( 'cmbToolbars' ) ;
+	oCombo.value = editorInstance.ToolbarSet.Name ;
+	oCombo.style.visibility = '' ;
+}
+
+function ChangeToolbar( toolbarName )
+{
+	window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
+}
+
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - ColdFusion Component (CFC) - Sample 3</h1>
+		This sample shows how to change the editor toolbar.
+		<hr>
+</cfoutput>
+<cfif listFirst( server.coldFusion.productVersion ) LT 6>
+	<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>
+	<cfabort>
+</cfif>
+<cfoutput>
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the toolbar to load:&nbsp;
+				</td>
+				<td>
+					<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
+						<option value="Default" selected>Default</option>
+						<option value="Basic">Basic</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br>
+<form action="sampleposteddata.cfm" method="post" target="_blank">
+</cfoutput>
+	<cfscript>
+		// Calculate basepath for FCKeditor. It's in the folder right above _samples
+		basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
+
+		fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
+		fckEditor.instanceName	= "myEditor" ;
+		fckEditor.value			= 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.' ;
+		fckEditor.basePath		= basePath ;
+		if ( isDefined( "URL.Toolbar" ) )
+		{
+			fckEditor.ToolbarSet		= HTMLEditFormat( URL.Toolbar ) ;
+		}
+		fckEditor.create() ; // create the editor.
+	</cfscript>
+<cfoutput>
+			<br>
+			<input type="submit" value="Submit">
+		</form>
+	</body>
+</html>
+</cfoutput>
+<cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample04.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample04.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sample04.cfm	(revision 697)
@@ -0,0 +1,100 @@
+<cfsetting enablecfoutputonly="true">
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page for ColdFusion.
+--->
+<cfoutput>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+	<head>
+		<title>FCKeditor - Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		<meta name="robots" content="noindex, nofollow">
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+
+function FCKeditor_OnComplete( editorInstance )
+{
+	var oCombo = document.getElementById( 'cmbSkins' ) ;
+
+	// Get the active skin.
+	var sSkin = editorInstance.Config['SkinPath'] ;
+	sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
+
+	oCombo.value = sSkin ;
+	oCombo.style.visibility = '' ;
+}
+
+function ChangeSkin( skinName )
+{
+	window.location.href = window.location.pathname + "?Skin=" + skinName ;
+}
+
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - ColdFusion - Sample 4</h1>
+		This sample shows how to change the editor skin.
+		<hr>
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the skin to load:&nbsp;
+				</td>
+				<td>
+					<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
+						<option value="default" selected>Default</option>
+						<option value="office2003">Office 2003</option>
+						<option value="silver">Silver</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br>
+		<form action="sampleposteddata.cfm" method="post" target="_blank">
+</cfoutput>
+
+<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
+<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
+
+<cfset config = structNew()>
+<cfif isDefined( "URL.Skin" )>
+	<cfset config["SkinPath"] = basePath & 'editor/skins/' & HTMLEditFormat( URL.Skin ) & '/'>
+</cfif>
+
+<cfmodule
+	template="../../fckeditor.cfm"
+	basePath="#basePath#"
+	instanceName="myEditor"
+	value='This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.'
+	width="100%"
+	height="200"
+	config="#config#"
+>
+
+<cfoutput>
+			<br>
+			<input type="submit" value="Submit">
+		</form>
+	</body>
+</html>
+</cfoutput>
+<cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sample04_mx.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sample04_mx.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sample04_mx.cfm	(revision 697)
@@ -0,0 +1,101 @@
+<cfsetting enablecfoutputonly="true">
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page for ColdFusion MX.
+--->
+<cfoutput>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+	<head>
+		<title>FCKeditor - Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		<meta name="robots" content="noindex, nofollow">
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+
+function FCKeditor_OnComplete( editorInstance )
+{
+	var oCombo = document.getElementById( 'cmbSkins' ) ;
+
+	// Get the active skin.
+	var sSkin = editorInstance.Config['SkinPath'] ;
+	sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
+
+	oCombo.value = sSkin ;
+	oCombo.style.visibility = '' ;
+}
+
+function ChangeSkin( skinName )
+{
+	window.location.href = window.location.pathname + "?Skin=" + skinName ;
+}
+
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - ColdFusion Component (CFC) - Sample 4</h1>
+		This sample shows how to change the editor skin.
+		<hr>
+</cfoutput>
+<cfif listFirst( server.coldFusion.productVersion ) LT 6>
+	<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>
+	<cfabort>
+</cfif>
+<cfoutput>
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the skin to load:&nbsp;
+				</td>
+				<td>
+					<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
+						<option value="default" selected>Default</option>
+						<option value="office2003">Office 2003</option>
+						<option value="silver">Silver</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br>
+		<form action="sampleposteddata.cfm" method="post" target="_blank">
+</cfoutput>
+	<cfscript>
+		// Calculate basepath for FCKeditor. It's in the folder right above _samples
+		basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
+
+		fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
+		fckEditor.instanceName	= "myEditor" ;
+		fckEditor.value			= 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.' ;
+		fckEditor.basePath		= basePath ;
+		if ( isDefined( "URL.Skin" ) )
+		{
+			fckEditor.config['SkinPath'] = basePath & 'editor/skins/' & HTMLEditFormat( URL.Skin ) & '/' ;
+		}
+		fckEditor.create() ; // create the editor.
+	</cfscript>
+<cfoutput>
+			<br>
+			<input type="submit" value="Submit">
+		</form>
+	</body>
+</html>
+</cfoutput>
+<cfsetting enablecfoutputonly="false">
Index: /FCKeditor/trunk/_samples/cfm/sampleposteddata.cfm
===================================================================
--- /FCKeditor/trunk/_samples/cfm/sampleposteddata.cfm	(revision 697)
+++ /FCKeditor/trunk/_samples/cfm/sampleposteddata.cfm	(revision 697)
@@ -0,0 +1,69 @@
+<!---
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * This page lists the data posted by a form.
+ */
+--->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+	<head>
+		<title>FCKeditor - Samples - Posted Data</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		<meta name="robots" content="noindex, nofollow">
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+	</head>
+	<body>
+		<h1>FCKeditor - Samples - Posted Data</h1>
+		This page lists all data posted by the form.
+		<hr>
+<cfif listFirst( server.coldFusion.productVersion ) LT 6>
+	<cfif isDefined( 'FORM.fieldnames' )>
+		<cfoutput>
+		<hr />
+		<style>
+		<!--
+			td, th { font: 11px Verdana, Arial, Helv, Helvetica, sans-serif; }
+		-->
+		</style>
+		<table border="1" cellspacing="0" cellpadding="2" bordercolor="darkblue" bordercolordark="darkblue" bordercolorlight="darkblue">
+		<tr>
+			<th colspan="2" bgcolor="darkblue"><font color="white"><strong>Dump of FORM Variables</strong></font></th>
+		</tr>
+		<tr>
+			<td bgcolor="lightskyblue">FieldNames</td>
+			<td>#FORM.fieldNames#</td>
+		</tr>
+		<cfloop list="#FORM.fieldnames#" index="key">
+		<tr>
+			<td valign="top" bgcolor="lightskyblue">#key#</td>
+			<td>#HTMLEditFormat( evaluate( "FORM.#key#" ) )#</td>
+		</tr>
+		</cfloop>
+		</table>
+		</cfoutput>
+	</cfif>
+<cfelse>
+	<cfdump var="#FORM#" label="Dump of FORM Variables">
+</cfif>
+
+
+	</body>
+</html>
Index: /FCKeditor/trunk/fckeditor.cfc
===================================================================
--- /FCKeditor/trunk/fckeditor.cfc	(revision 696)
+++ /FCKeditor/trunk/fckeditor.cfc	(revision 697)
@@ -1,3 +1,4 @@
 <cfcomponent output="false" displayname="FCKeditor" hint="Create an instance of the FCKeditor.">
+
 <!---
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
@@ -43,10 +44,23 @@
  * limitation with the cfc invocation.
 --->
-<cffunction
-	name="create"
+
+<cffunction
+	name="Create"
 	access="public"
 	output="true"
 	returntype="void"
-	hint="Initialize the FCKeditor instance."
+	hint="Outputs the editor HTML in the place where the function is called"
+>
+	<cfoutput>
+		#CreateHtml()#
+	</cfoutput>
+</cffunction>
+
+<cffunction
+	name="CreateHtml"
+	access="public"
+	output="false"
+	returntype="string"
+	hint="Retrieves the editor HTML"
 >
 
@@ -63,7 +77,7 @@
 	// display the html editor or a plain textarea?
 	if( isCompatible() )
-		showHTMLEditor();
+		return getHtmlEditor();
 	else
-		showTextArea();
+		return getTextArea();
 	</cfscript>
 
@@ -117,10 +131,11 @@
 
 <cffunction
-	name="showTextArea"
-	access="private"
-	output="true"
-	returnType="void"
+	name="getTextArea"
+	access="private"
+	output="false"
+	returnType="string"
 	hint="Create a textarea field for non-compatible browsers."
 >
+	<cfset var result = "" />
 
 	<cfscript>
@@ -132,21 +147,22 @@
 	</cfscript>
 
-	<cfoutput>
-	<div>
-	<textarea name="#this.instanceName#" rows="4" cols="40" style="WIDTH: #this.width#; HEIGHT: #this.height#">#HTMLEditFormat(this.value)#</textarea>
-	</div>
-	</cfoutput>
-
-</cffunction>
-
-<cffunction
-	name="showHTMLEditor"
-	access="private"
-	output="true"
-	returnType="void"
+	<cfscript>
+	result = result & "<div>" & chr(13) & chr(10);
+	result = result & "<textarea name=""#this.instanceName#"" rows=""4"" cols=""40"" style=""WIDTH: #this.width#; HEIGHT: #this.height#"">#HTMLEditFormat(this.value)#</textarea>" & chr(13) & chr(10);
+	result = result & "</div>" & chr(13) & chr(10);
+	</cfscript>
+	<cfreturn result />
+</cffunction>
+
+<cffunction
+	name="getHtmlEditor"
+	access="private"
+	output="false"
+	returnType="string"
 	hint="Create the html editor instance for compatible browsers."
 >
 	<cfset var sURL = "" />
-	
+	<cfset var result = "" />
+
 	<cfscript>
 	// try to fix the basePath, if ending slash is missing
@@ -162,12 +178,12 @@
 	</cfscript>
 
-	<cfoutput>
-	<div>
-	<input type="hidden" id="#this.instanceName#" name="#this.instanceName#" value="#HTMLEditFormat(this.value)#" style="display:none" />
-	<input type="hidden" id="#this.instanceName#___Config" value="#GetConfigFieldString()#" style="display:none" />
-	<iframe id="#this.instanceName#___Frame" src="#sURL#" width="#this.width#" height="#this.height#" frameborder="0" scrolling="no"></iframe>
-	</div>
-	</cfoutput>
-
+	<cfscript>
+	result = result & "<div>" & chr(13) & chr(10);
+	result = result & "<input type=""hidden"" id=""#this.instanceName#"" name=""#this.instanceName#"" value=""#HTMLEditFormat(this.value)#"" style=""display:none"" />" & chr(13) & chr(10);
+	result = result & "<input type=""hidden"" id=""#this.instanceName#___Config"" value=""#GetConfigFieldString()#"" style=""display:none"" />" & chr(13) & chr(10);
+	result = result & "<iframe id=""#this.instanceName#___Frame"" src=""#sURL#"" width=""#this.width#"" height=""#this.height#"" frameborder=""0"" scrolling=""no""></iframe>" & chr(13) & chr(10);
+	result = result & "</div>" & chr(13) & chr(10);
+	</cfscript>
+	<cfreturn result />
 </cffunction>
 
@@ -205,9 +221,9 @@
 	lConfigKeys = lConfigKeys & ",FontFormats,StylesXmlPath,TemplatesXmlPath,SpellChecker,IeSpellDownloadUrl";
 	lConfigKeys = lConfigKeys & ",SpellerPagesServerScript,FirefoxSpellChecker,MaxUndoLevels,DisableObjectResizing,DisableFFTableHandles";
-	lConfigKeys = lConfigKeys & ",LinkDlgHideTarget	,LinkDlgHideAdvanced,ImageDlgHideLink	,ImageDlgHideAdvanced,FlashDlgHideAdvanced";
+	lConfigKeys = lConfigKeys & ",LinkDlgHideTarget,LinkDlgHideAdvanced,ImageDlgHideLink,ImageDlgHideAdvanced,FlashDlgHideAdvanced";
 	lConfigKeys = lConfigKeys & ",ProtectedTags,BodyId,BodyClass,DefaultLinkTarget,CleanWordKeepsStructure";
 	lConfigKeys = lConfigKeys & ",LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight,ImageBrowser";
 	lConfigKeys = lConfigKeys & ",ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,FlashBrowser,FlashBrowserURL";
-	lConfigKeys = lConfigKeys & ",FlashBrowserWindowWidth ,FlashBrowserWindowHeight,LinkUpload,LinkUploadURL,LinkUploadWindowWidth";
+	lConfigKeys = lConfigKeys & ",FlashBrowserWindowWidth,FlashBrowserWindowHeight,LinkUpload,LinkUploadURL,LinkUploadWindowWidth";
 	lConfigKeys = lConfigKeys & ",LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions,ImageUpload,ImageUploadURL";
 	lConfigKeys = lConfigKeys & ",ImageUploadAllowedExtensions,ImageUploadDeniedExtensions,FlashUpload,FlashUploadURL,FlashUploadAllowedExtensions";
