~ubuntu-branches/ubuntu/precise/moin/precise-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/_testcases/004.html

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-13 16:45:52 UTC
  • mfrom: (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20081113164552-49t6zf2t2o5bqigh
Tags: 1.8.0-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop recommendation of python-xml, the packages isn't anymore in
    sys.path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
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: 004.html
15
 
 *      Test page.
16
 
 * 
17
 
 * File Authors:
18
 
 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
19
 
-->
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="testcases.css" rel="stylesheet" type="text/css">
26
 
                <script type="text/javascript" src="../fckeditor.js"></script>
27
 
                <script language="javascript">
28
 
 
29
 
function Show()
30
 
{
31
 
        document.getElementById('eEditor').style.display        = '' ;
32
 
        document.getElementById('eNoEditor').style.display      = 'none' ;
33
 
 
34
 
        // This is a hack for Gecko... it stops editing when the editor is hidden.
35
 
        if ( !document.all )
36
 
        {
37
 
                var oEditor = FCKeditorAPI.GetInstance( 'FCKeditor1' ) ;
38
 
                
39
 
                if (  oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
40
 
                        oEditor.MakeEditable() ;
41
 
        }
42
 
}
43
 
 
44
 
function Hide()
45
 
{
46
 
        document.getElementById('eEditor').style.display        = 'none' ;
47
 
        document.getElementById('eNoEditor').style.display      = '' ;
48
 
}
49
 
 
50
 
                </script>
51
 
        </head>
52
 
        <body>
53
 
                <h1 id="Prova">FCKeditor - Test 004</h1>
54
 
                <P>
55
 
                        <STRONG>Expected results</STRONG> : The editor must still work when hidding it 
56
 
                        programmatically (through javascript).<BR>
57
 
                        <STRONG>Configurations</STRONG>: Default<BR>
58
 
                        <STRONG>Steps to&nbsp;Reproduce</STRONG>:
59
 
                </P>
60
 
                <OL>
61
 
                        <LI>
62
 
                        Wait the page to load.
63
 
                        <LI>
64
 
                        Hit the "Show Editor" button.
65
 
                        <LI>
66
 
                        Insert some text and format it.
67
 
                        <LI>
68
 
                        Hit the "Hide Editor" button.
69
 
                        <LI>
70
 
                        Hit the "Submit" and check the posted HTML.
71
 
                        <LI>
72
 
                        Close the "Submit" window.
73
 
                        <LI>
74
 
                        Hit the "Show Editor" button.
75
 
                        <LI>
76
 
                                Repeat steps 2 and 4.</LI></OL>
77
 
                <P>
78
 
                        <hr>
79
 
                <P></P>
80
 
                <form action="sampleposteddata.asp" method="post" target="_blank">
81
 
                        <div id="eNoEditor">
82
 
                                <input type="button" value="Show Editor" onclick="Show();">
83
 
                        </div>
84
 
                        <div id="eEditor" style="DISPLAY: none">
85
 
                                <input type="button" value="Hide Editor" onclick="Hide();">
86
 
                                <br><br>
87
 
                                <script type="text/javascript">
88
 
<!--
89
 
// Automatically calculates the editor base path based on the _samples directory.
90
 
// This is usefull only for these samples. A real application should use something like this:
91
 
// oFCKeditor.BasePath = '/fckeditor/' ;        // '/fckeditor/' is the default value.
92
 
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
93
 
 
94
 
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
95
 
oFCKeditor.BasePath     = sBasePath ;
96
 
oFCKeditor.Value        = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
97
 
oFCKeditor.Create() ;
98
 
//-->
99
 
                                </script>
100
 
                        </div>
101
 
                        <br>
102
 
                        <input type="submit" value="Submit">
103
 
                </form>
104
 
        </body>
105
 
</html>