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

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/_samples/html/sample05.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: sample05.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( 'cmbSkins' ) ;
 
32
        
 
33
        // Get the active skin.
 
34
        var sSkin = editorInstance.Config['SkinPath'] ;
 
35
        sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
 
36
        
 
37
        oCombo.value = sSkin ;
 
38
        oCombo.style.visibility = '' ;
 
39
}
 
40
 
 
41
function ChangeLanguage( languageCode )
 
42
{
 
43
        window.location.href = window.location.pathname + "?" + languageCode ;
 
44
}
 
45
 
 
46
                </script>
 
47
        </head>
 
48
        <body>
 
49
                <h1>FCKeditor - Javascript - Sample 5</h1>
 
50
                This sample shows how to change the editor skin.
 
51
                <hr>
 
52
                <table cellpadding="0" cellspacing="0" border="0">
 
53
                        <tr>
 
54
                                <td>
 
55
                                        Select the skin to load:&nbsp;
 
56
                                </td>
 
57
                                <td>
 
58
                                        <select id="cmbSkins" onchange="ChangeLanguage(this.value);" style="VISIBILITY: hidden">
 
59
                                                <option value="default" selected>Default</option>
 
60
                                                <option value="office2003">Office 2003</option>
 
61
                                                <option value="silver">Silver</option>
 
62
                                        </select>
 
63
                                </td>
 
64
                        </tr>
 
65
                </table>
 
66
                <br>
 
67
                <form action="sampleposteddata.asp" method="post" target="_blank">
 
68
                        <script type="text/javascript">
 
69
<!--
 
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
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/_samples/')+1) ;
 
74
 
 
75
// Get the skin from the URL.
 
76
var sSkin ;
 
77
if ( document.location.search.length > 1 )
 
78
        sSkin = document.location.search.substr(1) ;
 
79
 
 
80
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
 
81
oFCKeditor.BasePath     = sBasePath ;
 
82
 
 
83
if ( sSkin != null )
 
84
        oFCKeditor.Config['SkinPath'] = sBasePath + 'editor/skins/' + sSkin + '/' ;
 
85
 
 
86
oFCKeditor.Value        = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
 
87
oFCKeditor.Create() ;
 
88
//-->
 
89
                        </script>
 
90
                        <br>
 
91
                        <input type="submit" value="Submit">
 
92
                </form>
 
93
        </body>
 
94
</html>
 
 
b'\\ No newline at end of file'