1 | <!DOCTYPE html> |
---|
2 | <!-- |
---|
3 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. |
---|
4 | For licensing, see LICENSE.html or http://ckeditor.com/license |
---|
5 | --> |
---|
6 | <html> |
---|
7 | <head> |
---|
8 | <title>Replace Textarea by Code — CKEditor Sample</title> |
---|
9 | <meta charset="utf-8"> |
---|
10 | <script src="../ckeditor.js"></script> |
---|
11 | <link href="sample.css" rel="stylesheet"> |
---|
12 | |
---|
13 | </head> |
---|
14 | <body> |
---|
15 | <h1 class="samples"> |
---|
16 | <a href="index.html">CKEditor Samples</a> » Replace Textarea Elements Using JavaScript Code |
---|
17 | </h1> |
---|
18 | <form action="sample_posteddata.php" method="post"> |
---|
19 | <div class="description"> |
---|
20 | <p> |
---|
21 | This editor is using an <code><iframe></code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin. |
---|
22 | </p> |
---|
23 | <pre class="samples"> |
---|
24 | |
---|
25 | CKEDITOR.replace( '<em>textarea_id</em>' ) |
---|
26 | </pre> |
---|
27 | </div> |
---|
28 | <textarea cols="80" id="editor1" name="editor1" rows="10"> |
---|
29 | </textarea> |
---|
30 | <script> |
---|
31 | var editor = CKEDITOR.replace( 'editor1', { |
---|
32 | enterMode : CKEDITOR.ENTER_BR |
---|
33 | } ); |
---|
34 | |
---|
35 | |
---|
36 | |
---|
37 | </script> |
---|
38 | <p> |
---|
39 | <input type="submit" value="Submit"> |
---|
40 | </p> |
---|
41 | </form> |
---|
42 | <div id="footer"> |
---|
43 | <hr> |
---|
44 | <p> |
---|
45 | CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> |
---|
46 | </p> |
---|
47 | <p id="copy"> |
---|
48 | Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico |
---|
49 | Knabben. All rights reserved. |
---|
50 | </p> |
---|
51 | </div> |
---|
52 | </body> |
---|
53 | </html> |
---|