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 / php / sample03.php

sample03.php in Wp-Insert 1.2, at fckeditor/_samples/php/sample03.php

179 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4
5 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
6
7 * Copyright (C) 2003-2009 Frederico Caldeira Knabben
8
9 *
10
11 * == BEGIN LICENSE ==
12
13 *
14
15 * Licensed under the terms of any of the following licenses at your
16
17 * choice:
18
19 *
20
21 * - GNU General Public License Version 2 or later (the "GPL")
22
23 * http://www.gnu.org/licenses/gpl.html
24
25 *
26
27 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
28
29 * http://www.gnu.org/licenses/lgpl.html
30
31 *
32
33 * - Mozilla Public License Version 1.1 or later (the "MPL")
34
35 * http://www.mozilla.org/MPL/MPL-1.1.html
36
37 *
38
39 * == END LICENSE ==
40
41 *
42
43 * Sample page.
44
45 */
46
47
48
49 include("../../fckeditor.php") ;
50
51 ?>
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( 'cmbToolbars' ) ;
76
77 oCombo.value = editorInstance.ToolbarSet.Name ;
78
79 oCombo.style.visibility = '' ;
80
81 }
82
83
84
85 function ChangeToolbar( toolbarName )
86
87 {
88
89 window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
90
91 }
92
93
94
95 </script>
96
97 </head>
98
99 <body>
100
101 <h1>FCKeditor - PHP - Sample 3</h1>
102
103 This sample shows how to change the editor toolbar.
104
105 <hr>
106
107 <table cellpadding="0" cellspacing="0" border="0">
108
109 <tr>
110
111 <td>
112
113 Select the toolbar to load:&nbsp;
114
115 </td>
116
117 <td>
118
119 <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
120
121 <option value="Default" selected>Default</option>
122
123 <option value="Basic">Basic</option>
124
125 </select>
126
127 </td>
128
129 </tr>
130
131 </table>
132
133 <br>
134
135 <form action="sampleposteddata.php" method="post" target="_blank">
136
137 <?php
138
139 // Automatically calculates the editor base path based on the _samples directory.
140
141 // This is usefull only for these samples. A real application should use something like this:
142
143 // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
144
145 $sBasePath = $_SERVER['PHP_SELF'] ;
146
147 $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
148
149
150
151 $oFCKeditor = new FCKeditor('FCKeditor1') ;
152
153 $oFCKeditor->BasePath = $sBasePath ;
154
155
156
157 if ( isset($_GET['Toolbar']) )
158
159 $oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
160
161
162
163 $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
164
165 $oFCKeditor->Create() ;
166
167 ?>
168
169 <br>
170
171 <input type="submit" value="Submit">
172
173 </form>
174
175 </body>
176
177 </html>
178
179