1 | <html> |
---|
2 | <head> |
---|
3 | <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.12.0.min.js"></script> |
---|
4 | <script language="javascript" src="ckeditor/ckeditor.js"></script> |
---|
5 | <script language="javascript" src="ckeditor/adapters/jquery.js"></script> |
---|
6 | <script language="javascript"> |
---|
7 | $(document).ready(function() { |
---|
8 | $("[id^='editor']").ckeditor().on("blur",function(){alert($(this).ckeditor().editor.getData());return false;}); |
---|
9 | //$("[id^='editor']").ckeditor().on("blur",function(){alert($(this).ckeditor().editor.getData());}); |
---|
10 | //$(".editor").ckeditor().on("blur",function(event,editor,data){alert(editor);}); |
---|
11 | //$(".editor").bind("blur",function(){ alert($(this).ckeditor());}); |
---|
12 | //CKEDITOR.instances.editor1.on("change", function() {alert('test 1 2 3')}); |
---|
13 | //CKEDITOR.disableAutoInline = true; |
---|
14 | //var editor = CKEDITOR.inline( document.getElementById( 'editor1' ) ); |
---|
15 | }); |
---|
16 | </script> |
---|
17 | </head> |
---|
18 | <body> |
---|
19 | <table border=1> |
---|
20 | <tr> |
---|
21 | <td> |
---|
22 | <div id="editor1" contenteditable="true"> |
---|
23 | <h1>Inline Editing in Action!</h1> |
---|
24 | <p>The "div" element that contains this text is now editable.</p> |
---|
25 | </div> |
---|
26 | </td> |
---|
27 | </tr> |
---|
28 | <tr> |
---|
29 | <td> |
---|
30 | <div id="editor2" contenteditable="true"> |
---|
31 | <h1>Inline Editing in Action!</h1> |
---|
32 | <p>The "div" element that contains this text is now editable. |
---|
33 | </div> |
---|
34 | </td> |
---|
35 | </tr> |
---|
36 | </table> |
---|
37 | </body> |
---|
38 | </html> |
---|