| 1 | <!DOCTYPE html> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
|---|
| 5 | <title>Replace Textarea by Code — CKEditor Sample</title> |
|---|
| 6 | <meta charset="utf-8"> |
|---|
| 7 | <script src="../ckeditor.js"></script> |
|---|
| 8 | </head> |
|---|
| 9 | <body> |
|---|
| 10 | <form name="form1"> |
|---|
| 11 | <textarea name="text1">sample text</textarea> |
|---|
| 12 | </form> |
|---|
| 13 | <script> |
|---|
| 14 | var editor = CKEDITOR.replace( 'text1', { |
|---|
| 15 | |
|---|
| 16 | }); |
|---|
| 17 | |
|---|
| 18 | CKEDITOR.on( 'instanceReady', function( evt ) { |
|---|
| 19 | editor.on( 'change', function() { |
|---|
| 20 | console.log( 'change fired!' ); |
|---|
| 21 | }); |
|---|
| 22 | }); |
|---|
| 23 | </script> |
|---|
| 24 | </body> |
|---|
| 25 | </html> |
|---|