comparison wiki/htdocs/applets/FCKeditor/_testcases/008.html @ 0:77665d8e2254

tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0 (automatically generated log message) imported from: moin--main--1.5--base-0
author Thomas Waldmann <tw-public@gmx.de>
date Thu, 22 Sep 2005 15:09:50 +0000
parents
children 79dbcefdff31
comparison
equal deleted inserted replaced
-1:000000000000 0:77665d8e2254
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: 008.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>
28
29 function 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>FCKeditor - Test 008</h1>
46 <P>
47 <STRONG>Expected results</STRONG>: The editor content must be loaded and the
48 submit button must post the editors html.<BR>
49 <STRONG>Configurations</STRONG>: Default<BR>
50 <STRONG>Steps to&nbsp;Reproduce</STRONG>:
51 </P>
52 <OL>
53 <LI>
54 Wait the editor to load.
55 <LI>
56 Remove all the content with the mouse and delete it.
57 <LI>
58 Hit the "Save" button - an alert should popup.
59 <LI>
60 Insert some text.
61 <LI>
62 Hit the "Save" button and check the posted data.
63 <LI>
64 Close the data window.
65 <LI>
66 Press the "New Page" button.
67 <LI>
68 Hit the "Save" button - an alert should popup.</LI></OL>
69 <P>
70 <hr>
71 <P></P>
72 <form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="return Validate();">
73 <script type="text/javascript">
74 <!--
75 // Automatically calculates the editor base path based on the _samples directory.
76 // This is usefull only for these samples. A real application should use something like this:
77 // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
78 var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
79
80 var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
81 oFCKeditor.BasePath = sBasePath ;
82 oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
83 oFCKeditor.Create() ;
84 //-->
85 </script>
86 </form>
87 </body>
88 </html>