1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <!-- |
---|
3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net |
---|
4 | * Copyright (C) 2003-2008 Frederico Caldeira Knabben |
---|
5 | * |
---|
6 | * == BEGIN LICENSE == |
---|
7 | * |
---|
8 | * Licensed under the terms of any of the following licenses at your |
---|
9 | * choice: |
---|
10 | * |
---|
11 | * - GNU General Public License Version 2 or later (the "GPL") |
---|
12 | * http://www.gnu.org/licenses/gpl.html |
---|
13 | * |
---|
14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
---|
15 | * http://www.gnu.org/licenses/lgpl.html |
---|
16 | * |
---|
17 | * - Mozilla Public License Version 1.1 or later (the "MPL") |
---|
18 | * http://www.mozilla.org/MPL/MPL-1.1.html |
---|
19 | * |
---|
20 | * == END LICENSE == |
---|
21 | * |
---|
22 | * Sample page. |
---|
23 | --> |
---|
24 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
25 | <head> |
---|
26 | <title>FCKeditor - Sample</title> |
---|
27 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
28 | <meta name="robots" content="noindex, nofollow" /> |
---|
29 | <link href="../sample.css" rel="stylesheet" type="text/css" /> |
---|
30 | <script type="text/javascript" src="../../fckeditor.js"></script> |
---|
31 | <script type="text/javascript"> |
---|
32 | |
---|
33 | window.onload = function() |
---|
34 | { |
---|
35 | // Automatically calculates the editor base path based on the _samples directory. |
---|
36 | // This is usefull only for these samples. A real application should use something like this: |
---|
37 | // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. |
---|
38 | var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; |
---|
39 | |
---|
40 | var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; |
---|
41 | oFCKeditor.BasePath = sBasePath ; |
---|
42 | oFCKeditor.ReplaceTextarea() ; |
---|
43 | |
---|
44 | var oFCKeditor2 = new FCKeditor( 'FCKeditor2' ) ; |
---|
45 | oFCKeditor2.BasePath = sBasePath ; |
---|
46 | oFCKeditor2.ReplaceTextarea() ; |
---|
47 | } |
---|
48 | |
---|
49 | </script> |
---|
50 | </head> |
---|
51 | <body> |
---|
52 | <h1> |
---|
53 | FCKeditor - JavaScript - Sample 2</h1> |
---|
54 | <div> |
---|
55 | This sample displays a normal HTML form with an FCKeditor with full features enabled. |
---|
56 | It uses the "ReplaceTextarea" command to create the editor. |
---|
57 | </div> |
---|
58 | <hr /> |
---|
59 | <form action="../php/sampleposteddata.php" method="post" target="_blank"> |
---|
60 | <div> |
---|
61 | <textarea name="FCKeditor1" rows="5" cols="80" style="width: 100%; height: 200px"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p></textarea> |
---|
62 | |
---|
63 | <textarea name="FCKeditor2" rows="10" cols="80" style="width: 100%; height: 300px">test</textarea> |
---|
64 | </div> |
---|
65 | <br /> |
---|
66 | <input type="submit" value="Submit" /> |
---|
67 | <br /> |
---|
68 | <input type="button" value="Get" onclick="alert('FCKeditor1' +'=>'+ FCKeditorAPI.GetInstance('FCKeditor1'));alert('FCKeditor2' +'=>'+ FCKeditorAPI.GetInstance('FCKeditor2'));" /> |
---|
69 | </form> |
---|
70 | |
---|
71 | |
---|
72 | </body> |
---|
73 | </html> |
---|