1 | <html> |
---|
2 | <head> |
---|
3 | <title>TC #7844, #5956</title> |
---|
4 | <script type="text/javascript" src="../ckeditor_source.js"></script> |
---|
5 | <script src="sample.js" type="text/javascript"></script> |
---|
6 | <link href="sample.css" rel="stylesheet" type="text/css" /> |
---|
7 | </head> |
---|
8 | <body> |
---|
9 | <form action="sample_posteddata.php" method="post"> |
---|
10 | <p style="display: none"> |
---|
11 | <label for="editor1"> |
---|
12 | Editor 1:</label> |
---|
13 | <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea> |
---|
14 | <script type="text/javascript"> |
---|
15 | //<![CDATA[ |
---|
16 | |
---|
17 | // This call can be placed at any point after the |
---|
18 | // <textarea>, or inside a <head><script> in a |
---|
19 | // window.onload event handler. |
---|
20 | |
---|
21 | // Replace the <textarea id="editor"> with an CKEditor |
---|
22 | // instance, using default configurations. |
---|
23 | CKEDITOR.replace( 'editor1' ); |
---|
24 | |
---|
25 | //]]> |
---|
26 | </script> |
---|
27 | </p> |
---|
28 | <p style="display: none"> |
---|
29 | <label for="editor2"> |
---|
30 | Editor 2:</label> |
---|
31 | <textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea> |
---|
32 | </p> |
---|
33 | <p> |
---|
34 | <input type="button" value="Create editor 2" onclick="CKEDITOR.replace( 'editor2' )" /> |
---|
35 | <input type="button" value="setData() to editor1" onclick="CKEDITOR.instances.editor1.setData( 'Test data for editor 1' )" /> |
---|
36 | <input type="button" value="setData() to editor2" onclick="CKEDITOR.instances.editor2.setData( 'Test data for editor 2' )" /> |
---|
37 | <input type="submit" value="Submit" /> |
---|
38 | </p> |
---|
39 | </form> |
---|
40 | </body> |
---|
41 | </html> |
---|