1
<cfsetting enablecfoutputonly="true">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2008 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.
26
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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
<script type="text/javascript">
35
function FCKeditor_OnComplete( editorInstance )
37
var oCombo = document.getElementById( 'cmbLanguages' ) ;
38
for ( code in editorInstance.Language.AvailableLanguages )
40
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
42
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
45
function AddComboOption(combo, optionText, optionValue)
47
var oOption = document.createElement("OPTION") ;
49
combo.options.add(oOption) ;
51
oOption.innerHTML = optionText ;
52
oOption.value = optionValue ;
57
function ChangeLanguage( languageCode )
59
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
64
<h1>FCKeditor - ColdFusion - Sample 2</h1>
65
This sample shows the editor in all its available languages.
67
<table cellpadding="0" cellspacing="0" border="0">
70
Select a language:
73
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
79
<form action="sampleposteddata.cfm" method="post" target="_blank">
82
<cfset config = structNew()>
83
<cfif isDefined( "URL.Lang" )>
84
<cfset config["AutoDetectLanguage"] = false>
85
<cfset config["DefaultLanguage"] = HTMLEditFormat( URL.Lang )>
87
<cfset config["AutoDetectLanguage"] = true>
88
<cfset config["DefaultLanguage"] = 'en'>
91
<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
92
<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
95
template="../../fckeditor.cfm"
97
instanceName="myEditor"
98
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
105
<input type="submit" value="Submit">
110
<cfsetting enablecfoutputonly="false">