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 | </head> |
---|
13 | <body> |
---|
14 | <h1 class="samples"> |
---|
15 | <a href="index.html">CKEditor Samples</a> » Replace Textarea Elements Using JavaScript Code |
---|
16 | </h1> |
---|
17 | <form id="myform" action="sample_posteddata.php" method="post"> |
---|
18 | <div class="description"> |
---|
19 | <p> |
---|
20 | This editor is using an <code><iframe></code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin. |
---|
21 | </p> |
---|
22 | <pre class="samples"> |
---|
23 | |
---|
24 | CKEDITOR.replace( '<em>textarea_id</em>' ) |
---|
25 | </pre> |
---|
26 | </div> |
---|
27 | <textarea cols="80" id="editor1" name="editor1" rows="10"> |
---|
28 | </textarea> |
---|
29 | |
---|
30 | <script> |
---|
31 | var editor = CKEDITOR.replace( 'editor1', { |
---|
32 | startupMode : 'source' |
---|
33 | } ); |
---|
34 | </script> |
---|
35 | <p> |
---|
36 | <input type="submit" value="Submit"> |
---|
37 | </p> |
---|
38 | </form> |
---|
39 | <div id="footer"> |
---|
40 | <hr> |
---|
41 | <p> |
---|
42 | CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> |
---|
43 | </p> |
---|
44 | <p id="copy"> |
---|
45 | Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico |
---|
46 | Knabben. All rights reserved. |
---|
47 | </p> |
---|
48 | </div> |
---|
49 | </body> |
---|
50 | </html> |
---|