1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | |
---|
4 | <head> |
---|
5 | <title>CKEditor .destroy() issue in IE</title> |
---|
6 | </head> |
---|
7 | |
---|
8 | <body> |
---|
9 | <h2>CKEDITOR .destroy() issue in all IE's!</h2> |
---|
10 | <script> |
---|
11 | function myprevious(){ |
---|
12 | document.getElementById("param2").style.display = 'none'; |
---|
13 | document.getElementById("param1").style.display = 'block'; |
---|
14 | CKEDITOR.replace("txtarea"); |
---|
15 | return false; |
---|
16 | } |
---|
17 | |
---|
18 | function mynext(){ |
---|
19 | CKEDITOR.instances.txtarea.destroy(true); |
---|
20 | CKEDITOR.instances.txtarea = null; |
---|
21 | document.getElementById("param1").style.display = 'none'; |
---|
22 | document.getElementById("param2").style.display = 'block'; |
---|
23 | return false; |
---|
24 | } |
---|
25 | </script> |
---|
26 | |
---|
27 | <form name="myForm"> |
---|
28 | <div id="dialog"> |
---|
29 | <div id="param1" style="display: block;"> |
---|
30 | <h3>ckeditor</h3> |
---|
31 | <label> |
---|
32 | <textarea name="txtarea"></textarea> |
---|
33 | </label> |
---|
34 | </div> |
---|
35 | <div style="display: none;" id="param2"> |
---|
36 | <h3>input</h3> |
---|
37 | <label> |
---|
38 | <input id="myfocus"/> |
---|
39 | </label> |
---|
40 | </div> |
---|
41 | <input type="button" id="prev" onclick="myprevious()" value="prev"/> |
---|
42 | <input type="button" id="next" onclick="mynext()" value="next"/> |
---|
43 | </div> |
---|
44 | </form> |
---|
45 | |
---|
46 | |
---|
47 | <script src="//cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script> |
---|
48 | <script> |
---|
49 | CKEDITOR.replace("txtarea", { |
---|
50 | toolbar: [ |
---|
51 | ['Source'] |
---|
52 | ] |
---|
53 | }); |
---|
54 | </script> |
---|
55 | </body> |
---|
56 | |
---|
57 | </html> |
---|