1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <!-- |
---|
3 | Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
---|
4 | For licensing, see LICENSE.html or http://ckeditor.com/license |
---|
5 | --> |
---|
6 | <html xmlns="http://www.w3.org/1999/xhtml" > |
---|
7 | <head> |
---|
8 | <title>Sample - CKEditor</title> |
---|
9 | <meta content="text/html; charset=utf-8" http-equiv="content-type"/> |
---|
10 | <script type="text/javascript" src="../ckeditor.js"></script> |
---|
11 | <link href="sample.css" rel="stylesheet" type="text/css"/> |
---|
12 | <script type="text/javascript"> |
---|
13 | function checkdirty() |
---|
14 | { |
---|
15 | alert(CKEDITOR.instances['editor1'].checkDirty()); |
---|
16 | } |
---|
17 | </script> |
---|
18 | </head> |
---|
19 | <body> |
---|
20 | <h1> |
---|
21 | CKEditor Sample |
---|
22 | </h1> |
---|
23 | <!-- This <div> holds alert messages to be display in the sample page. --> |
---|
24 | <div id="alerts"> |
---|
25 | <noscript> |
---|
26 | <p> |
---|
27 | <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript |
---|
28 | support, like yours, you should still see the contents (HTML data) and you should |
---|
29 | be able to edit it normally, without a rich editor interface. |
---|
30 | </p> |
---|
31 | </noscript> |
---|
32 | </div> |
---|
33 | <!-- This <fieldset> holds the HTML that you will usually find in your |
---|
34 | pages. --> |
---|
35 | <form action="sample_posteddata.php" method="post"> |
---|
36 | <p> |
---|
37 | <label for="editor1"> |
---|
38 | Editor 1:</label><br/> |
---|
39 | <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> |
---|
40 | <script type="text/javascript"> |
---|
41 | //<![CDATA[ |
---|
42 | |
---|
43 | // This call can be placed at any point after the |
---|
44 | // <textarea>, or inside a <head><script> in a |
---|
45 | // window.onload event handler. |
---|
46 | |
---|
47 | // Replace the <textarea id="editor"> with an CKEditor |
---|
48 | // instance, using default configurations. |
---|
49 | CKEDITOR.config.skin='office2003'; |
---|
50 | CKEDITOR.config.autoLanguage = false;CKEDITOR.config.language= 'en'; |
---|
51 | CKEDITOR.replace( 'editor1' ); |
---|
52 | CKEDITOR.instances['editor1'].setData(""); |
---|
53 | //CKEDITOR.instances['editor1'].resetDirty(); |
---|
54 | CKEDITOR.instances['editor1'].on( 'contentDom', function( ev ){ ev.editor.resetDirty(); } ); |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | //]]> |
---|
59 | </script> |
---|
60 | </p> |
---|
61 | <p> |
---|
62 | <label for="editor2"> |
---|
63 | Editor 2:</label><br/> |
---|
64 | <textarea cols="80" id="editor2" name="editor2" rows="10"><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( 'editor2' ); |
---|
75 | |
---|
76 | //]]> |
---|
77 | </script> |
---|
78 | </p> |
---|
79 | <p> |
---|
80 | <input type="button" value="checkdirty" onclick="javascript:checkdirty();"/> |
---|
81 | </p> |
---|
82 | </form> |
---|
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> |
---|