1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>Replace Textarea by Code — CKEditor Sample</title> |
---|
5 | <meta charset="utf-8"> |
---|
6 | <script src="./ckeditor4/ckeditor.js"></script> |
---|
7 | </head> |
---|
8 | <body> |
---|
9 | <div> |
---|
10 | <div id="editor2" contenteditable="true" style="border:1px solid #000; margin-bottom: 150px;"> |
---|
11 | <p>Some Random Text.</p> |
---|
12 | </div> |
---|
13 | |
---|
14 | <textarea cols="80" id="editor1" name="editor1" rows="10"> |
---|
15 | <p>Some Random Text.</p> |
---|
16 | </textarea> |
---|
17 | |
---|
18 | <script> |
---|
19 | CKEDITOR.disableAutoInline = true; |
---|
20 | |
---|
21 | var editor2 = CKEDITOR.inline( 'editor2', { |
---|
22 | extraPlugins : 'lineutils' |
---|
23 | }); |
---|
24 | |
---|
25 | var editor = CKEDITOR.replace( 'editor1', { |
---|
26 | extraPlugins : 'lineutils' |
---|
27 | }); |
---|
28 | </script> |
---|
29 | </div> |
---|
30 | </body> |
---|
31 | </html> |
---|