source: companies/celepar/news_admin/templates/celepar/fckeditor/to_delete/_testcases/008.html @ 763

Revision 763, 2.7 KB checked in by niltonneto, 15 years ago (diff)

Importação inicial do Expresso da Celepar

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!--
3 * FCKeditor - The text editor for internet
4 * Copyright (C) 2003-2006 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: 008.html
15 *      Test page.
16 *
17 * File Authors:
18 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
19-->
20<html xmlns="http://www.w3.org/1999/xhtml">
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 type="text/javascript">
28
29function Validate()
30{
31        // Get the editor instance that we want to interact with.
32        var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
33
34        // Get the editor contents in XHTML.
35        if ( oEditor.GetXHTML( false ).length == 0 )
36        {
37                alert( 'The "Save" command must not submit if the editor is empty' ) ;
38                return false ;
39        }
40}
41
42        </script>
43</head>
44<body>
45        <h1>
46                FCKeditor - Test 008</h1>
47        <p>
48                <strong>Expected results</strong>: The editor content must be loaded and the submit
49                button must post the editors html.<br />
50                <strong>Configurations</strong>: Default<br />
51                <strong>Steps to&nbsp;Reproduce</strong>:
52        </p>
53        <ol>
54                <li>Wait the editor to load.</li>
55                <li>Select all the content with the mouse and delete it.</li>
56                <li>Hit the "Save" button - an alert should popup.</li>
57                <li>Insert some text.</li>
58                <li>Hit the "Save" button and check the posted data.</li>
59                <li>Close the data window.</li>
60                <li>Press the "New Page" button.</li>
61                <li>Hit the "Save" button - an alert should popup.</li>
62        </ol>
63        <p>
64                <hr />
65                <p>
66                </p>
67                <form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="return Validate();">
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.
73var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
74
75var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
76oFCKeditor.BasePath     = sBasePath ;
77oFCKeditor.Value        = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
78oFCKeditor.Create() ;
79//-->
80                        </script>
81                </form>
82</body>
83</html>
Note: See TracBrowser for help on using the repository browser.