~ubuntu-branches/ubuntu/trusty/fusionforge/trusty

« back to all changes in this revision

Viewing changes to plugins/fckeditor/www/_samples/cfm/sample04.cfm

  • Committer: Bazaar Package Importer
  • Author(s): Roland Mas
  • Date: 2011-04-15 14:55:34 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110415145534-mvn1nochufjmw177
Tags: 5.0.3-1
New upstream bugfix release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<cfsetting enablecfoutputonly="true">
 
2
<!---
 
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
4
 * Copyright (C) 2003-2008 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.
 
23
--->
 
24
<cfoutput>
 
25
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
26
<html>
 
27
        <head>
 
28
                <title>FCKeditor - Sample</title>
 
29
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
30
                <meta name="robots" content="noindex, nofollow">
 
31
                <link href="../sample.css" rel="stylesheet" type="text/css" />
 
32
                <script type="text/javascript">
 
33
 
 
34
function FCKeditor_OnComplete( editorInstance )
 
35
{
 
36
        var oCombo = document.getElementById( 'cmbSkins' ) ;
 
37
 
 
38
        // Get the active skin.
 
39
        var sSkin = editorInstance.Config['SkinPath'] ;
 
40
        sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
 
41
 
 
42
        oCombo.value = sSkin ;
 
43
        oCombo.style.visibility = '' ;
 
44
}
 
45
 
 
46
function ChangeSkin( skinName )
 
47
{
 
48
        window.location.href = window.location.pathname + "?Skin=" + skinName ;
 
49
}
 
50
 
 
51
                </script>
 
52
        </head>
 
53
        <body>
 
54
                <h1>FCKeditor - ColdFusion - Sample 4</h1>
 
55
                This sample shows how to change the editor skin.
 
56
                <hr>
 
57
                <table cellpadding="0" cellspacing="0" border="0">
 
58
                        <tr>
 
59
                                <td>
 
60
                                        Select the skin to load:&nbsp;
 
61
                                </td>
 
62
                                <td>
 
63
                                        <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
 
64
                                                <option value="default" selected>Default</option>
 
65
                                                <option value="office2003">Office 2003</option>
 
66
                                                <option value="silver">Silver</option>
 
67
                                        </select>
 
68
                                </td>
 
69
                        </tr>
 
70
                </table>
 
71
                <br>
 
72
                <form action="sampleposteddata.cfm" method="post" target="_blank">
 
73
</cfoutput>
 
74
 
 
75
<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
 
76
<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
 
77
 
 
78
<cfset config = structNew()>
 
79
<cfif isDefined( "URL.Skin" )>
 
80
        <cfset config["SkinPath"] = basePath & 'editor/skins/' & HTMLEditFormat( URL.Skin ) & '/'>
 
81
</cfif>
 
82
 
 
83
<cfmodule
 
84
        template="../../fckeditor.cfm"
 
85
        basePath="#basePath#"
 
86
        instanceName="myEditor"
 
87
        value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
 
88
        width="100%"
 
89
        height="200"
 
90
        config="#config#"
 
91
>
 
92
 
 
93
<cfoutput>
 
94
                        <br>
 
95
                        <input type="submit" value="Submit">
 
96
                </form>
 
97
        </body>
 
98
</html>
 
99
</cfoutput>
 
100
<cfsetting enablecfoutputonly="false">