1 | <!DOCTYPE html> |
---|
2 | <html lang="en"> |
---|
3 | <head> |
---|
4 | <meta charset="utf-8"> |
---|
5 | <title>Test</title> |
---|
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
---|
7 | <script src="../ckeditor.js"></script> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | |
---|
11 | <p>Step 1: <a href="#" onclick="return killEditor();">Kill Editor</a></p> |
---|
12 | <p>Step 2: <a href="#" onclick="return buildEditor();">Rebuild Editor</a></p> |
---|
13 | |
---|
14 | <textarea name="editor"></textarea> |
---|
15 | |
---|
16 | <script type="text/javascript"> |
---|
17 | buildEditor = function() { |
---|
18 | CKEDITOR.replace('editor', { |
---|
19 | height : '500', |
---|
20 | width : '100%', |
---|
21 | scayt_autoStartup: true |
---|
22 | }); |
---|
23 | return false; |
---|
24 | } |
---|
25 | killEditor = function() { |
---|
26 | if (CKEDITOR.instances['editor']) |
---|
27 | CKEDITOR.instances['editor'].destroy(true); |
---|
28 | return false; |
---|
29 | } |
---|
30 | buildEditor(); |
---|
31 | </script> |
---|
32 | |
---|
33 | </body> |
---|
34 | </html> |
---|