[1257] | 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: 010.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 | |
---|
| 29 | function SubmitForm() |
---|
| 30 | { |
---|
| 31 | document.forms[0].submit() ; |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | function SetToolbar( toolbarName ) |
---|
| 35 | { |
---|
| 36 | // Get the editor instance that we want to interact with. |
---|
| 37 | var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; |
---|
| 38 | oEditor.ToolbarSet.Load( toolbarName ) ; |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | </script> |
---|
| 42 | </head> |
---|
| 43 | <body> |
---|
| 44 | <h1> |
---|
| 45 | FCKeditor - Test 010</h1> |
---|
| 46 | <p> |
---|
| 47 | <strong>Expected results</strong>: The editor content must be loaded and the the |
---|
| 48 | user must be able to change the toolbar dinamically (without reloading the page).<br /> |
---|
| 49 | <strong>Configurations</strong>: Default<br /> |
---|
| 50 | <strong>Steps to Reproduce</strong>: |
---|
| 51 | </p> |
---|
| 52 | <ol> |
---|
| 53 | <li>Wait the editor to load.</li> |
---|
| 54 | <li>Select some text and format it.</li> |
---|
| 55 | <li>Select the "Basic" toolbar.</li> |
---|
| 56 | <li>Format more text.</li> |
---|
| 57 | <li>Select the "Default" toolbar.</li> |
---|
| 58 | <li>Go to "Source" view.</li> |
---|
| 59 | <li>Select the "Basic" toolbar.</li> |
---|
| 60 | <li>Select the "Default" toolbar.</li> |
---|
| 61 | <li>Go to "WYSIWYG" view.</li> |
---|
| 62 | <li>Hit submit button and check the posted data.</li></ol> |
---|
| 63 | <hr /> |
---|
| 64 | <p> |
---|
| 65 | Select the toolbar you want to load:<br /> |
---|
| 66 | <select onchange="SetToolbar( this.value );"> |
---|
| 67 | <option value="Default" selected="selected">Default</option> |
---|
| 68 | <option value="Basic">Basic</option> |
---|
| 69 | </select> |
---|
| 70 | </p> |
---|
| 71 | <form action="sampleposteddata.asp" method="post" target="_blank"> |
---|
| 72 | <script type="text/javascript"> |
---|
| 73 | <!-- |
---|
| 74 | // Automatically calculates the editor base path based on the _samples directory. |
---|
| 75 | // This is usefull only for these samples. A real application should use something like this: |
---|
| 76 | // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. |
---|
| 77 | var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ; |
---|
| 78 | |
---|
| 79 | var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; |
---|
| 80 | oFCKeditor.BasePath = sBasePath ; |
---|
| 81 | oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ; |
---|
| 82 | oFCKeditor.Create() ; |
---|
| 83 | //--> |
---|
| 84 | </script> |
---|
| 85 | <br /> |
---|
| 86 | <input type="submit" value="Submit" /> |
---|
| 87 | </form> |
---|
| 88 | </body> |
---|
| 89 | </html> |
---|