| 1 | <!DOCTYPE html> |
|---|
| 2 | <!-- |
|---|
| 3 | Copyright (c) 2003-2012, 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 with a "DIV-based" editor — 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 with a "DIV-based" editor |
|---|
| 16 | </h1> |
|---|
| 17 | <form action="sample_posteddata.php" method="post"> |
|---|
| 18 | <div class="description"> |
|---|
| 19 | <p> |
|---|
| 20 | This editor is using a <code><div></code> element-based editing area, provided by the <strong>Divarea</strong> plugin. |
|---|
| 21 | </p> |
|---|
| 22 | <pre class="samples"> |
|---|
| 23 | CKEDITOR.replace( '<em>textarea_id</em>', { |
|---|
| 24 | extraPlugins: 'divarea' |
|---|
| 25 | });</pre> |
|---|
| 26 | </div> |
|---|
| 27 | <textarea cols="80" id="editor1" name="editor1" rows="10"></textarea> |
|---|
| 28 | <script> |
|---|
| 29 | |
|---|
| 30 | // This call can be placed at any point after the |
|---|
| 31 | // <textarea>, or inside a <head><script> in a |
|---|
| 32 | // window.onload event handler. |
|---|
| 33 | |
|---|
| 34 | // Replace the <textarea id="editor"> with an CKEditor |
|---|
| 35 | // instance, using default configurations. |
|---|
| 36 | CKEDITOR.replace( 'editor1', { |
|---|
| 37 | extraPlugins: 'autogrow,divarea', |
|---|
| 38 | height : 100, |
|---|
| 39 | autoGrow_minHeight : 600, |
|---|
| 40 | |
|---|
| 41 | }); |
|---|
| 42 | |
|---|
| 43 | </script> |
|---|
| 44 | <p> |
|---|
| 45 | <input type="submit" value="Submit"> |
|---|
| 46 | </p> |
|---|
| 47 | </form> |
|---|
| 48 | <div id="footer"> |
|---|
| 49 | <hr> |
|---|
| 50 | <p> |
|---|
| 51 | CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> |
|---|
| 52 | </p> |
|---|
| 53 | <p id="copy"> |
|---|
| 54 | Copyright © 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico |
|---|
| 55 | Knabben. All rights reserved. |
|---|
| 56 | </p> |
|---|
| 57 | </div> |
|---|
| 58 | </body> |
|---|
| 59 | </html> |
|---|