PluginProbe
Wp-Insert / 1.2
Wp-Insert v1.2
trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3.0 1.3.1 1.3.3 1.4 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 2.0 All 63 releases
wp-insert / fckeditor / _samples / asp / sample04.asp

sample04.asp in Wp-Insert 1.2, at fckeditor/_samples/asp/sample04.asp

197 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <%@ CodePage=65001 Language="VBScript"%>
2
3 <% Option Explicit %>
4
5 <!--
6
7 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
8
9 * Copyright (C) 2003-2009 Frederico Caldeira Knabben
10
11 *
12
13 * == BEGIN LICENSE ==
14
15 *
16
17 * Licensed under the terms of any of the following licenses at your
18
19 * choice:
20
21 *
22
23 * - GNU General Public License Version 2 or later (the "GPL")
24
25 * http://www.gnu.org/licenses/gpl.html
26
27 *
28
29 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
30
31 * http://www.gnu.org/licenses/lgpl.html
32
33 *
34
35 * - Mozilla Public License Version 1.1 or later (the "MPL")
36
37 * http://www.mozilla.org/MPL/MPL-1.1.html
38
39 *
40
41 * == END LICENSE ==
42
43 *
44
45 * Sample page.
46
47 -->
48
49 <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
50
51 <!-- #INCLUDE file="../../fckeditor.asp" -->
52
53 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
54
55 <html>
56
57 <head>
58
59 <title>FCKeditor - Sample</title>
60
61 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
62
63 <meta name="robots" content="noindex, nofollow">
64
65 <link href="../sample.css" rel="stylesheet" type="text/css" />
66
67 <script type="text/javascript">
68
69
70
71 function FCKeditor_OnComplete( editorInstance )
72
73 {
74
75 var oCombo = document.getElementById( 'cmbSkins' ) ;
76
77
78
79 // Get the active skin.
80
81 var sSkin = editorInstance.Config['SkinPath'] ;
82
83 sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
84
85
86
87 oCombo.value = sSkin ;
88
89 oCombo.style.visibility = '' ;
90
91 }
92
93
94
95 function ChangeSkin( skinName )
96
97 {
98
99 window.location.href = window.location.pathname + "?Skin=" + skinName ;
100
101 }
102
103
104
105 </script>
106
107 </head>
108
109 <body>
110
111 <h1>FCKeditor - ASP - Sample 4</h1>
112
113 This sample shows how to change the editor skin.
114
115 <hr>
116
117 <table cellpadding="0" cellspacing="0" border="0">
118
119 <tr>
120
121 <td>
122
123 Select the skin to load:&nbsp;
124
125 </td>
126
127 <td>
128
129 <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
130
131 <option value="default" selected>Default</option>
132
133 <option value="office2003">Office 2003</option>
134
135 <option value="silver">Silver</option>
136
137 </select>
138
139 </td>
140
141 </tr>
142
143 </table>
144
145 <br>
146
147 <form action="sampleposteddata.asp" method="post" target="_blank">
148
149 <%
150
151 ' Automatically calculates the editor base path based on the _samples directory.
152
153 ' This is usefull only for these samples. A real application should use something like this:
154
155 ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
156
157 Dim sBasePath
158
159 sBasePath = Request.ServerVariables("PATH_INFO")
160
161 sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
162
163
164
165 Dim oFCKeditor
166
167 Set oFCKeditor = New FCKeditor
168
169 oFCKeditor.BasePath = sBasePath
170
171
172
173 If Request.QueryString("Skin") <> "" Then
174
175 oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"
176
177 End If
178
179
180
181 oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
182
183 oFCKeditor.Create "FCKeditor1"
184
185 %>
186
187 <br>
188
189 <input type="submit" value="Submit">
190
191 </form>
192
193 </body>
194
195 </html>
196
197