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 / sample02.asp

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

217 lines 3.4 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( 'cmbLanguages' ) ;
76
77 for ( code in editorInstance.Language.AvailableLanguages )
78
79 {
80
81 AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
82
83 }
84
85 oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
86
87 }
88
89
90
91 function AddComboOption(combo, optionText, optionValue)
92
93 {
94
95 var oOption = document.createElement("OPTION") ;
96
97
98
99 combo.options.add(oOption) ;
100
101
102
103 oOption.innerHTML = optionText ;
104
105 oOption.value = optionValue ;
106
107
108
109 return oOption ;
110
111 }
112
113
114
115 function ChangeLanguage( languageCode )
116
117 {
118
119 window.location.href = window.location.pathname + "?Lang=" + languageCode ;
120
121 }
122
123 </script>
124
125 </head>
126
127 <body>
128
129 <h1>FCKeditor - ASP - Sample 2</h1>
130
131 This sample shows the editor in all its available languages.
132
133 <hr>
134
135 <table cellpadding="0" cellspacing="0" border="0">
136
137 <tr>
138
139 <td>
140
141 Select a language:&nbsp;
142
143 </td>
144
145 <td>
146
147 <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
148
149 </select>
150
151 </td>
152
153 </tr>
154
155 </table>
156
157 <br>
158
159 <form action="sampleposteddata.asp" method="post" target="_blank">
160
161 <%
162
163 ' Automatically calculates the editor base path based on the _samples directory.
164
165 ' This is usefull only for these samples. A real application should use something like this:
166
167 ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
168
169 Dim sBasePath
170
171 sBasePath = Request.ServerVariables("PATH_INFO")
172
173 sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
174
175
176
177 Dim oFCKeditor
178
179 Set oFCKeditor = New FCKeditor
180
181 oFCKeditor.BasePath = sBasePath
182
183
184
185 If Request.QueryString("Lang") = "" Then
186
187 oFCKeditor.Config("AutoDetectLanguage") = True
188
189 oFCKeditor.Config("DefaultLanguage") = "en"
190
191 Else
192
193 oFCKeditor.Config("AutoDetectLanguage") = False
194
195 oFCKeditor.Config("DefaultLanguage") = Request.QueryString("Lang")
196
197 End If
198
199
200
201 oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
202
203 oFCKeditor.Create "FCKeditor1"
204
205 %>
206
207 <br>
208
209 <input type="submit" value="Submit">
210
211 </form>
212
213 </body>
214
215 </html>
216
217