| 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( 'runTest' ).style.display = ''; |
|---|
| 18 | }); |
|---|
| 19 | |
|---|
| 20 | function runTest() |
|---|
| 21 | { |
|---|
| 22 | var fireResize = function(ev) { |
|---|
| 23 | ev.removeListener(); |
|---|
| 24 | new CKEDITOR.dom.window(window).fire('resize'); |
|---|
| 25 | }, |
|---|
| 26 | onDataReady = function(ev) { |
|---|
| 27 | ev.removeListener(); |
|---|
| 28 | ev.editor.on('dataReady', fireResize); |
|---|
| 29 | ev.editor.execCommand('source'); |
|---|
| 30 | }; |
|---|
| 31 | editor.on('dataReady', onDataReady); |
|---|
| 32 | editor.setData('some data'); |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | //]]> |
|---|
| 36 | </script> |
|---|
| 37 | |
|---|
| 38 | </head> |
|---|
| 39 | <body> |
|---|
| 40 | <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> |
|---|
| 41 | <input id="runTest" onclick="runTest();" type="button" value="RunTest" style="display:none" /> |
|---|
| 42 | </body> |
|---|
| 43 | </html> |
|---|