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

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/_samples/lasso/sample02.lasso

  • 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
[//lasso
 
2
/*
 
3
 * FCKeditor - The text editor for internet
 
4
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 
5
 * 
 
6
 * Licensed under the terms of the GNU Lesser General Public License:
 
7
 *              http://www.opensource.org/licenses/lgpl-license.php
 
8
 * 
 
9
 * For further information visit:
 
10
 *              http://www.fckeditor.net/
 
11
 * 
 
12
 * "Support Open Source software. What about a donation today?"
 
13
 * 
 
14
 * File Name: sample02.lasso
 
15
 *      Sample page.
 
16
 * 
 
17
 * File Authors:
 
18
 *              Jason Huck (jason.huck@corefive.com)
 
19
 */
 
20
]
 
21
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
22
<html>
 
23
        <head>
 
24
                <title>FCKeditor - Sample</title>
 
25
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
26
                <meta name="robots" content="noindex, nofollow">
 
27
                <link href="../sample.css" rel="stylesheet" type="text/css" />
 
28
                <script type="text/javascript">
 
29
                <!--
 
30
function FCKeditor_OnComplete( editorInstance )
 
31
{
 
32
        var oCombo = document.getElementById( 'cmbLanguages' ) ;
 
33
        for ( code in editorInstance.Language.AvailableLanguages )
 
34
        {
 
35
                AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
 
36
        }
 
37
        oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
 
38
}       
 
39
 
 
40
function AddComboOption(combo, optionText, optionValue)
 
41
{
 
42
        var oOption = document.createElement("OPTION") ;
 
43
 
 
44
        combo.options.add(oOption) ;
 
45
 
 
46
        oOption.innerHTML = optionText ;
 
47
        oOption.value     = optionValue ;
 
48
        
 
49
        return oOption ;
 
50
}
 
51
 
 
52
function ChangeLanguage( languageCode )
 
53
{
 
54
        window.location.href = window.location.pathname + "?Lang=" + languageCode ;
 
55
}
 
56
                //-->
 
57
                </script>
 
58
        </head>
 
59
        <body>
 
60
                <h1>FCKeditor - Lasso - Sample 2</h1>
 
61
                This sample shows the editor in all its available languages.
 
62
                <hr>
 
63
                <table cellpadding="0" cellspacing="0" border="0">
 
64
                        <tr>
 
65
                                <td>
 
66
                                        Select a language:&nbsp;
 
67
                                </td>
 
68
                                <td>
 
69
                                        <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
 
70
                                        </select>
 
71
                                </td>
 
72
                        </tr>
 
73
                </table>
 
74
                <br>
 
75
                <form action="sampleposteddata.lasso" method="post" target="_blank">
 
76
[//lasso
 
77
        include('../../fckeditor.lasso');
 
78
        var('basepath') = response_filepath->split('_samples')->get(1);
 
79
 
 
80
        if(action_param('Lang'));
 
81
                var('config') = array(
 
82
                        'AutoDetectLanguage' = 'false',
 
83
                        'DefaultLanguage' = action_param('Lang')
 
84
                );
 
85
        else;
 
86
                var('config') = array(
 
87
                        'AutoDetectLanguage' = 'true',
 
88
                        'DefaultLanguage' = 'en'
 
89
                );
 
90
        /if;
 
91
 
 
92
        var('myeditor') = fck_editor(
 
93
                -instancename='FCKeditor1',
 
94
                -basepath=$basepath,
 
95
                -config=$config,
 
96
                -initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
 
97
        );
 
98
        
 
99
        $myeditor->create;
 
100
]
 
101
                        <br>
 
102
                        <input type="submit" value="Submit">
 
103
                </form>
 
104
        </body>
 
105
</html>