1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>#9160 CKEditor Sample</title> |
---|
5 | <meta content="text/html; charset=utf-8" http-equiv="content-type" /> |
---|
6 | <script type="text/javascript" src="../ckeditor.js"></script> |
---|
7 | <script src="sample.js" type="text/javascript"></script> |
---|
8 | <link href="sample.css" rel="stylesheet" type="text/css" /> |
---|
9 | <script type="text/javascript"> |
---|
10 | //<![CDATA[ |
---|
11 | |
---|
12 | var editor; |
---|
13 | |
---|
14 | CKEDITOR.on( 'instanceReady', function( ev ) |
---|
15 | { |
---|
16 | editor = ev.editor; |
---|
17 | document.getElementById( 'hideCKE' ).style.display = ''; |
---|
18 | document.getElementById( 'fireResize' ).style.display = ''; |
---|
19 | }); |
---|
20 | |
---|
21 | function hideCKE() |
---|
22 | { |
---|
23 | document.getElementById( 'panel' ).style.display = 'none'; |
---|
24 | document.getElementById( 'hideCKE' ).style.display = 'none'; |
---|
25 | document.getElementById( 'showCKE' ).style.display = ''; |
---|
26 | } |
---|
27 | |
---|
28 | function showCKE() |
---|
29 | { |
---|
30 | document.getElementById( 'panel' ).style.display = ''; |
---|
31 | document.getElementById( 'hideCKE' ).style.display = ''; |
---|
32 | document.getElementById( 'showCKE' ).style.display = 'none'; |
---|
33 | } |
---|
34 | |
---|
35 | function fireResize() { |
---|
36 | new CKEDITOR.dom.window(window).fire('resize'); |
---|
37 | } |
---|
38 | |
---|
39 | //]]> |
---|
40 | </script> |
---|
41 | |
---|
42 | </head> |
---|
43 | <body> |
---|
44 | <p>1.Hide editor.<br> |
---|
45 | 2.Fire resize.<br> |
---|
46 | 3.Show editor. -> Text is gone<br> |
---|
47 | 4.Fire resize. -> Text is back |
---|
48 | </p> |
---|
49 | |
---|
50 | <input id="hideCKE" onclick="hideCKE();" type="button" value="Hide CKE" style="display:none" /> |
---|
51 | <input id="showCKE" onclick="showCKE();" type="button" value="Show CKE" style="display:none" /> |
---|
52 | <input id="fireResize" onclick="fireResize();" type="button" value="Fire Resize" style="display:none" /> |
---|
53 | <div id="panel"> |
---|
54 | <textarea class="ckeditor" id="editor1" name="editor1" cols="100" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea> |
---|
55 | </div> |
---|
56 | </body> |
---|
57 | </html> |
---|