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