+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
-<!--\r
- * FCKeditor - The text editor for internet\r
- * Copyright (C) 2003-2006 Frederico Caldeira Knabben\r
- * \r
- * Licensed under the terms of the GNU Lesser General Public License:\r
- * http://www.opensource.org/licenses/lgpl-license.php\r
- * \r
- * For further information visit:\r
- * http://www.fckeditor.net/\r
- * \r
- * "Support Open Source software. What about a donation today?"\r
- * \r
- * File Name: 009.html\r
- * Test page.\r
- * \r
- * File Authors:\r
- * Frederico Caldeira Knabben (fredck@fckeditor.net)\r
--->\r
-<html>\r
- <head>\r
- <title>FCKeditor - Sample</title>\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
- <meta name="robots" content="noindex, nofollow">\r
- <link href="testcases.css" rel="stylesheet" type="text/css">\r
- <script type="text/javascript" src="../fckeditor.js"></script>\r
- <script>\r
-\r
-function FCKeditor_OnComplete( editorInstance )\r
-{\r
- // Attach to the event fired when the editor's HTML is set.\r
- editorInstance.Events.AttachEvent( 'OnAfterSetHTML', FCKeditor_OnAfterSetHTML ) ;\r
-}\r
-\r
-function FCKeditor_OnAfterSetHTML( editorInstance )\r
-{\r
- // Get the actual color from the combo.\r
- var sColor = document.getElementById('ActualColor').value ;\r
-\r
- // Set the color of the editor instance.\r
- editorInstance.EditorDocument.body.style.backgroundColor = sColor ;\r
-}\r
-\r
-function SetActualColor()\r
-{\r
- // Get the editor instance that we want to interact with.\r
- var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;\r
- \r
- // Call the event function to set the color.\r
- FCKeditor_OnAfterSetHTML( oEditor ) ;\r
-}\r
-\r
- </script>\r
- </head>\r
- <body>\r
- <h1>FCKeditor - Test 009</h1>\r
- <P>\r
- <STRONG>Expected results</STRONG> : The user should be able to background color \r
- of the editor by code.<BR>\r
- <STRONG>Configurations</STRONG>: Default<BR>\r
- <STRONG>Steps to Reproduce</STRONG>:\r
- </P>\r
- <OL>\r
- <LI>\r
- Wait the editor to load.\r
- <LI>\r
- Type some text.\r
- <LI>\r
- Change the background color using the combo.\r
- <LI>\r
- Type more text.\r
- <LI>\r
- Switch to source view.\r
- <LI>\r
- Switch back to WYSIWYG. The background color must be the same.\r
- <LI>\r
- Repeate steps 3 to 6.\r
- <LI>\r
- Submit the form.</LI></OL>\r
- <P>\r
- <hr>\r
- <P>\r
- Select a color for the background:<br>\r
- <select id="ActualColor" onchange="SetActualColor();">\r
- <option value="white" selected>White</option>\r
- <option value="red">Red</option>\r
- <option value="green">Green</option>\r
- <option value="gold">Gold</option>\r
- </select>\r
- </P>\r
- <form action="sampleposteddata.asp" method="post" target="_blank">\r
- <script type="text/javascript">\r
-<!--\r
-// Automatically calculates the editor base path based on the _samples directory.\r
-// This is usefull only for these samples. A real application should use something like this:\r
-// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.\r
-var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;\r
-\r
-var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;\r
-oFCKeditor.BasePath = sBasePath ;\r
-oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;\r
-oFCKeditor.Create() ;\r
-//-->\r
- </script>\r
- <br>\r
- <input type="submit" value="Submit">\r
- </form>\r
- </body>\r
-</html>\r