PluginProbe
Wp-Insert / 1.7.1
Wp-Insert v1.7.1
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.7.1, at fckeditor/_samples/php/sample03.php

90 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4 * Copyright (C) 2003-2009 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.
23 */
24
25 include("../../fckeditor.php") ;
26 ?>
27 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
28 <html>
29 <head>
30 <title>FCKeditor - Sample</title>
31 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
32 <meta name="robots" content="noindex, nofollow">
33 <link href="../sample.css" rel="stylesheet" type="text/css" />
34 <script type="text/javascript">
35
36 function FCKeditor_OnComplete( editorInstance )
37 {
38 var oCombo = document.getElementById( 'cmbToolbars' ) ;
39 oCombo.value = editorInstance.ToolbarSet.Name ;
40 oCombo.style.visibility = '' ;
41 }
42
43 function ChangeToolbar( toolbarName )
44 {
45 window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
46 }
47
48 </script>
49 </head>
50 <body>
51 <h1>FCKeditor - PHP - Sample 3</h1>
52 This sample shows how to change the editor toolbar.
53 <hr>
54 <table cellpadding="0" cellspacing="0" border="0">
55 <tr>
56 <td>
57 Select the toolbar to load:&nbsp;
58 </td>
59 <td>
60 <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
61 <option value="Default" selected>Default</option>
62 <option value="Basic">Basic</option>
63 </select>
64 </td>
65 </tr>
66 </table>
67 <br>
68 <form action="sampleposteddata.php" method="post" target="_blank">
69 <?php
70 // Automatically calculates the editor base path based on the _samples directory.
71 // This is usefull only for these samples. A real application should use something like this:
72 // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
73 $sBasePath = $_SERVER['PHP_SELF'] ;
74 $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
75
76 $oFCKeditor = new FCKeditor('FCKeditor1') ;
77 $oFCKeditor->BasePath = $sBasePath ;
78
79 if ( isset($_GET['Toolbar']) )
80 $oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
81
82 $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
83 $oFCKeditor->Create() ;
84 ?>
85 <br>
86 <input type="submit" value="Submit">
87 </form>
88 </body>
89 </html>
90