| Current Path : /var/www/cesa.co.za/relay/fckeditor/_testcases/ |
| Current File : /var/www/cesa.co.za/relay/fckeditor/_testcases/010.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* File Name: 010.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (www.fckeditor.net)
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="testcases.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../fckeditor.js"></script>
<script type="text/javascript">
function SubmitForm()
{
document.forms[0].submit() ;
}
function SetToolbar( toolbarName )
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
oEditor.ToolbarSet.Load( toolbarName ) ;
}
</script>
</head>
<body>
<h1>
FCKeditor - Test 010</h1>
<p>
<strong>Expected results</strong>: The editor content must be loaded and the the
user must be able to change the toolbar dinamically (without reloading the page).<br />
<strong>Configurations</strong>: Default<br />
<strong>Steps to Reproduce</strong>:
</p>
<ol>
<li>Wait the editor to load.</li>
<li>Select some text and format it.</li>
<li>Select the "Basic" toolbar.</li>
<li>Format more text.</li>
<li>Select the "Default" toolbar.</li>
<li>Go to "Source" view.</li>
<li>Select the "Basic" toolbar.</li>
<li>Select the "Default" toolbar.</li>
<li>Go to "WYSIWYG" view.</li>
<li>Hit submit button and check the posted data.</li></ol>
<hr />
<p>
Select the toolbar you want to load:<br />
<select onchange="SetToolbar( this.value );">
<option value="Default" selected="selected">Default</option>
<option value="Basic">Basic</option>
</select>
</p>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>