| 1 | <html> |
|---|
| 2 | <script type="text/javascript" src="http://nightly.ckeditor.com/6922/ckeditor.js"></script> |
|---|
| 3 | <script type="text/javascript"> |
|---|
| 4 | var editor_append; |
|---|
| 5 | var editor_replace; |
|---|
| 6 | |
|---|
| 7 | function hide(editor) {editor.element.$.parentNode.style.display="none";} |
|---|
| 8 | function show(editor) {editor.element.$.parentNode.style.display="block";} |
|---|
| 9 | |
|---|
| 10 | function setData(editor) { |
|---|
| 11 | editor.setData("Test Data"); |
|---|
| 12 | show(editor); |
|---|
| 13 | } |
|---|
| 14 | |
|---|
| 15 | function load() { |
|---|
| 16 | editor_append = CKEDITOR.appendTo('editor_append'); |
|---|
| 17 | editor_replace = CKEDITOR.replace('editor_replace'); |
|---|
| 18 | } |
|---|
| 19 | </script> |
|---|
| 20 | |
|---|
| 21 | <body onLoad="load();"> |
|---|
| 22 | |
|---|
| 23 | <div style="border: 2px solid #EEEEEE;"> |
|---|
| 24 | <h2>This test is for appendTo *broken*</h2> |
|---|
| 25 | <ol> |
|---|
| 26 | <li>Hit Hide</li> |
|---|
| 27 | <li>Hit Set Data & Show</li> |
|---|
| 28 | </ol> |
|---|
| 29 | |
|---|
| 30 | <input type="button" value="Hide" onclick="hide(editor_append);"></input> |
|---|
| 31 | <input type="button" value="Set Data & Show" onclick="setData(editor_append);"></input> |
|---|
| 32 | |
|---|
| 33 | <div id="container_append" > |
|---|
| 34 | <div id="editor_append"></div> |
|---|
| 35 | </div> |
|---|
| 36 | </div> |
|---|
| 37 | |
|---|
| 38 | <br><hr><br> |
|---|
| 39 | |
|---|
| 40 | <div style="border: 2px solid #EEEEEE;"> |
|---|
| 41 | <h2>This test is for replace</h2> |
|---|
| 42 | <p>This test case works as expected</p> |
|---|
| 43 | <ol> |
|---|
| 44 | <li>Hit Hide</li> |
|---|
| 45 | <li>Hit Set Data & Show</li> |
|---|
| 46 | </ol> |
|---|
| 47 | |
|---|
| 48 | <input type="button" value="Hide" onclick="hide(editor_replace);"></input> |
|---|
| 49 | <input type="button" value="Set Data & Show" onclick="setData(editor_replace);"></input> |
|---|
| 50 | |
|---|
| 51 | <div id="container_replace" > |
|---|
| 52 | <div id="editor_replace"></div> |
|---|
| 53 | </div> |
|---|
| 54 | </div> |
|---|
| 55 | </body> |
|---|
| 56 | </html> |
|---|