~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/_samples/html/sample04.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
 * FCKeditor - The text editor for internet
 
3
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 
4
 * 
 
5
 * Licensed under the terms of the GNU Lesser General Public License:
 
6
 *              http://www.opensource.org/licenses/lgpl-license.php
 
7
 * 
 
8
 * For further information visit:
 
9
 *              http://www.fckeditor.net/
 
10
 * 
 
11
 * "Support Open Source software. What about a donation today?"
 
12
 * 
 
13
 * File Name: sample04.html
 
14
 *      Sample page.
 
15
 * 
 
16
 * File Authors:
 
17
 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
 
18
-->
 
19
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
20
<html>
 
21
        <head>
 
22
                <title>FCKeditor - Sample</title>
 
23
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
24
                <meta name="robots" content="noindex, nofollow">
 
25
                <link href="../sample.css" rel="stylesheet" type="text/css">
 
26
                        <script type="text/javascript" src="../../fckeditor.js"></script>
 
27
                        <script type="text/javascript">
 
28
 
 
29
function FCKeditor_OnComplete( editorInstance )
 
30
{
 
31
        var oCombo = document.getElementById( 'cmbToolbars' ) ;
 
32
        oCombo.value = editorInstance.ToolbarSet.Name ;
 
33
        oCombo.style.visibility = '' ;
 
34
}
 
35
 
 
36
function ChangeLanguage( languageCode )
 
37
{
 
38
        window.location.href = window.location.pathname + "?" + languageCode ;
 
39
}
 
40
 
 
41
                        </script>
 
42
        </head>
 
43
        <body>
 
44
                <h1>FCKeditor - Javascript - Sample 4</h1>
 
45
                This sample shows how to change the editor toolbar.
 
46
                <hr>
 
47
                <table cellpadding="0" cellspacing="0" border="0">
 
48
                        <tr>
 
49
                                <td>
 
50
                                        Select the toolbar to load:&nbsp;
 
51
                                </td>
 
52
                                <td>
 
53
                                        <select id="cmbToolbars" onchange="ChangeLanguage(this.value);" style="VISIBILITY: hidden">
 
54
                                                <option value="Default" selected>Default</option>
 
55
                                                <option value="Basic">Basic</option>
 
56
                                        </select>
 
57
                                </td>
 
58
                        </tr>
 
59
                </table>
 
60
                <br>
 
61
                <form action="sampleposteddata.asp" method="post" target="_blank">
 
62
                        <script type="text/javascript">
 
63
<!--
 
64
// Automatically calculates the editor base path based on the _samples directory.
 
65
// This is usefull only for these samples. A real application should use something like this:
 
66
// oFCKeditor.BasePath = '/fckeditor/' ;        // '/fckeditor/' is the default value.
 
67
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/_samples/')+1) ;
 
68
 
 
69
// Get the toolbar from the URL.
 
70
var sToolbar ;
 
71
if ( document.location.search.length > 1 )
 
72
        sToolbar = document.location.search.substr(1) ;
 
73
 
 
74
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
 
75
oFCKeditor.BasePath     = sBasePath ;
 
76
 
 
77
if ( sToolbar != null )
 
78
        oFCKeditor.ToolbarSet = sToolbar ;
 
79
 
 
80
oFCKeditor.Value        = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
 
81
oFCKeditor.Create() ;
 
82
//-->
 
83
                        </script>
 
84
                        <br>
 
85
                        <input type="submit" value="Submit">
 
86
                </form>
 
87
        </body>
 
88
</html>