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

« back to all changes in this revision

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

  • 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
<%
 
2
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
3
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
 
4
 *
 
5
 * == BEGIN LICENSE ==
 
6
 *
 
7
 * Licensed under the terms of any of the following licenses at your
 
8
 * choice:
 
9
 *
 
10
 *  - GNU General Public License Version 2 or later (the "GPL")
 
11
 *    http://www.gnu.org/licenses/gpl.html
 
12
 *
 
13
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 
14
 *    http://www.gnu.org/licenses/lgpl.html
 
15
 *
 
16
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 
17
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 
18
 *
 
19
 * == END LICENSE ==
 
20
 *
 
21
 * This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
 
22
 *
 
23
%>
 
24
 
 
25
<html>
 
26
        <head>
 
27
                <title>FCKeditor - AFP Sample 4</title>
 
28
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
29
                <meta name="robots" content="noindex, nofollow">
 
30
                <link href="../sample.css" rel="stylesheet" type="text/css" />
 
31
 
 
32
                <script type="text/javascript">
 
33
                function FCKeditor_OnComplete( editorInstance )
 
34
                        {
 
35
                                var oCombo = document.getElementById( 'cmbSkins' ) ;
 
36
 
 
37
                                // Get the active skin.
 
38
                                var sSkin = editorInstance.Config['SkinPath'] ;
 
39
                                sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
 
40
 
 
41
                                oCombo.value = sSkin ;
 
42
                                oCombo.style.visibility = '' ;
 
43
                        }
 
44
 
 
45
                        function ChangeSkin( skinName )
 
46
                        {
 
47
                                window.location.href = window.location.pathname + "?Skin=" + skinName ;
 
48
                        }
 
49
                </script>
 
50
        </head>
 
51
        <body>
 
52
                <h1>FCKeditor - AFP - Sample 4</h1>
 
53
                This sample shows how to change the editor skin.
 
54
                <hr>
 
55
                <table cellpadding="0" cellspacing="0" border="0">
 
56
                        <tr>
 
57
                                <td>
 
58
                                        Select the skin to load:&nbsp;
 
59
                                </td>
 
60
                                <td>
 
61
                                        <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
 
62
                                                <option value="default" selected>Default</option>
 
63
                                                <option value="office2003">Office 2003</option>
 
64
                                                <option value="silver">Silver</option>
 
65
                                        </select>
 
66
                                </td>
 
67
                        </tr>
 
68
                </table>
 
69
                <br>
 
70
                <form action="sampleposteddata.afp" method="post" target="_blank">
 
71
<%
 
72
 
 
73
                        sBasePath="../../../fckeditor/"                                         && <-- Change this to your local path
 
74
 
 
75
                        oFCKeditor = CREATEOBJECT("FCKeditor")
 
76
                        oFCKeditor.fckeditor("FCKeditor1")
 
77
 
 
78
                        lcSkin=request.querystring("Skin")                                      && Request Parameter
 
79
                        lcSkin=oFCKeditor.StripAttacks(lcSkin)                          && Remove special escape characters
 
80
                        IF !EMPTY(lcSkin)
 
81
                                oFCKeditor.aconfig[1,1]="SkinPath"
 
82
                                oFCKeditor.aconfig[1,2]="/fckeditor/editor/skins/"+lcSkin+"/"   && <-- Change this to your local path
 
83
                        ENDIF
 
84
 
 
85
                        lcText=[<p>This is some <strong>sample text</strong>. You are using ]
 
86
                        lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
 
87
 
 
88
                        oFCKeditor.BasePath     = sBasePath
 
89
                        oFCKeditor.cValue       = lcText
 
90
 
 
91
                        ? oFCKeditor.Create()
 
92
 
 
93
%>
 
94
                        <br>
 
95
                        <input type="submit" value="Submit">
 
96
                </form>
 
97
        </body>
 
98
</html>