1 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
2 | <head> |
---|
3 | <title>Sample - CKEditor</title> |
---|
4 | <meta content="text/html; charset=utf-8" http-equiv="content-type"/> |
---|
5 | <script type="text/javascript" src="../ckeditor_source.js"></script> |
---|
6 | <link href="sample.css" rel="stylesheet" type="text/css"/> |
---|
7 | |
---|
8 | <SCRIPT> |
---|
9 | AjaxReq = function () |
---|
10 | { |
---|
11 | CKEDITOR.instances.editor1.destroy(); |
---|
12 | } |
---|
13 | |
---|
14 | </SCRIPT> |
---|
15 | </head> |
---|
16 | <body> |
---|
17 | <h1> |
---|
18 | CKEditor Sample |
---|
19 | </h1> |
---|
20 | <!-- This <div> holds alert messages to be display in the sample page. --> |
---|
21 | <div id="alerts"> |
---|
22 | <noscript> |
---|
23 | <p> |
---|
24 | <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript |
---|
25 | support, like yours, you should still see the contents (HTML data) and you should |
---|
26 | be able to edit it normally, without a rich editor interface. |
---|
27 | </p> |
---|
28 | </noscript> |
---|
29 | </div> |
---|
30 | <!-- This <fieldset> holds the HTML that you will usually find in your |
---|
31 | pages. --> |
---|
32 | <fieldset title="Output"> |
---|
33 | <legend>Output</legend> |
---|
34 | <form action="sample_posteddata.php" method="post"> |
---|
35 | <p><div id="editorcontent"> |
---|
36 | <label for="editor1"> |
---|
37 | Editor 1:</label><br/> |
---|
38 | <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</p></textarea></div> |
---|
39 | <script type="text/javascript"> |
---|
40 | //<![CDATA[ |
---|
41 | |
---|
42 | // This call can be placed at any point after the |
---|
43 | // <textarea>, or inside a <head><script> in a |
---|
44 | // window.onload event handler. |
---|
45 | |
---|
46 | // Replace the <textarea id="editor"> with an CKEditor |
---|
47 | // instance, using default configurations. |
---|
48 | CKEDITOR.replace( 'editor1' ); |
---|
49 | |
---|
50 | //]]> |
---|
51 | </script> |
---|
52 | </p> |
---|
53 | |
---|
54 | <p> |
---|
55 | <input type="button" value="Click me for multiple times to see the issue" onclick='javascript:AjaxReq();'/> |
---|
56 | </p> |
---|
57 | </form> |
---|
58 | </fieldset> |
---|
59 | <!-- This <fieldset> contains the output readable code that illustrates |
---|
60 | how to use the editor, having the results shown in this sample. --> |
---|
61 | <fieldset title="Code"> |
---|
62 | <legend>Code</legend> |
---|
63 | <pre> |
---|
64 | <form action=""> |
---|
65 | <p> |
---|
66 | <label for="editor1"> |
---|
67 | Editor 1:</label><br /> |
---|
68 | <textarea <b>name="editor1"</b> rows="10" cols="80"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</p></textarea> |
---|
69 | <script type="text/javascript"> |
---|
70 | //<![CDATA[ |
---|
71 | |
---|
72 | <b>CKEDITOR.replace( 'editor1' );</b> |
---|
73 | |
---|
74 | //]]> |
---|
75 | </script> |
---|
76 | </p> |
---|
77 | <p> |
---|
78 | <input type="submit" value="Submit" /> |
---|
79 | </p> |
---|
80 | </form> |
---|
81 | </pre> |
---|
82 | </fieldset> |
---|
83 | <div id="footer"> |
---|
84 | <hr/> |
---|
85 | <p> |
---|
86 | CKEditor - The text editor for Internet - <a href="http://ckeditor.com/" shape="rect">http://ckeditor.com</a> |
---|
87 | </p> |
---|
88 | <p id="copy"> |
---|
89 | Copyright © 2003-2009, <a href="http://cksource.com/" shape="rect">CKSource</a> - Frederico Knabben. All rights reserved. |
---|
90 | </p> |
---|
91 | </div> |
---|
92 | </body> |
---|
93 | </html> |
---|