1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
* FCKeditor - The text editor for internet
4
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
6
* Licensed under the terms of the GNU Lesser General Public License:
7
* http://www.opensource.org/licenses/lgpl-license.php
9
* For further information visit:
10
* http://www.fckeditor.net/
12
* "Support Open Source software. What about a donation today?"
18
* Frederico Caldeira Knabben (fredck@fckeditor.net)
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">
31
document.getElementById('eEditor').style.display = '' ;
32
document.getElementById('eNoEditor').style.display = 'none' ;
34
// This is a hack for Gecko... it stops editing when the editor is hidden.
37
var oEditor = FCKeditorAPI.GetInstance( 'FCKeditor1' ) ;
39
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
40
oEditor.MakeEditable() ;
46
document.getElementById('eEditor').style.display = 'none' ;
47
document.getElementById('eNoEditor').style.display = '' ;
53
<h1 id="Prova">FCKeditor - Test 004</h1>
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 Reproduce</STRONG>:
62
Wait the page to load.
64
Hit the "Show Editor" button.
66
Insert some text and format it.
68
Hit the "Hide Editor" button.
70
Hit the "Submit" and check the posted HTML.
72
Close the "Submit" window.
74
Hit the "Show Editor" button.
76
Repeat steps 2 and 4.</LI></OL>
80
<form action="sampleposteddata.asp" method="post" target="_blank">
82
<input type="button" value="Show Editor" onclick="Show();">
84
<div id="eEditor" style="DISPLAY: none">
85
<input type="button" value="Hide Editor" onclick="Hide();">
87
<script type="text/javascript">
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')) ;
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>.' ;
102
<input type="submit" value="Submit">