| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 2 | <!-- |
|---|
| 3 | Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. |
|---|
| 4 | For licensing, see LICENSE.html or http://ckeditor.com/license |
|---|
| 5 | --> |
|---|
| 6 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 7 | <head> |
|---|
| 8 | <title>Replace Textarea by Code - CKEditor Sample</title> |
|---|
| 9 | <meta content="text/html; charset=utf-8" http-equiv="content-type" /> |
|---|
| 10 | <script type="text/javascript" src="../ckeditor.js"></script> |
|---|
| 11 | <script src="sample.js" type="text/javascript"></script> |
|---|
| 12 | <link href="sample.css" rel="stylesheet" type="text/css" /> |
|---|
| 13 | </head> |
|---|
| 14 | <body> |
|---|
| 15 | |
|---|
| 16 | <table id="Table"> |
|---|
| 17 | <tr id="Row"> |
|---|
| 18 | <td class="fixedWidth"> |
|---|
| 19 | <p> |
|---|
| 20 | <label for="editor1"> |
|---|
| 21 | Editor 1:</label><br /> |
|---|
| 22 | <textarea id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea> |
|---|
| 23 | <script type="text/javascript"> |
|---|
| 24 | //<![CDATA[ |
|---|
| 25 | |
|---|
| 26 | // This call can be placed at any point after the |
|---|
| 27 | // <textarea>, or inside a <head><script> in a |
|---|
| 28 | // window.onload event handler. |
|---|
| 29 | |
|---|
| 30 | // Replace the <textarea id="editor"> with an CKEditor |
|---|
| 31 | // instance, using default configurations. |
|---|
| 32 | CKEDITOR.replace( 'editor1', |
|---|
| 33 | { |
|---|
| 34 | toolbar: [['Styles', 'Format'],['Bold', 'Italic', 'NumberedList', 'BulletedList', 'Link']], |
|---|
| 35 | height: 100, |
|---|
| 36 | width: "225px", |
|---|
| 37 | enterMode : CKEDITOR.ENTER_BR, |
|---|
| 38 | resize_enabled: false |
|---|
| 39 | } |
|---|
| 40 | ); |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | //]]> |
|---|
| 44 | </script> |
|---|
| 45 | </p> |
|---|
| 46 | </td> |
|---|
| 47 | <td class="fixedWidth"> |
|---|
| 48 | <p> |
|---|
| 49 | <label for="editor2"> |
|---|
| 50 | Editor 2:</label><br /> |
|---|
| 51 | <textarea id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea> |
|---|
| 52 | <script type="text/javascript"> |
|---|
| 53 | //<![CDATA[ |
|---|
| 54 | |
|---|
| 55 | // This call can be placed at any point after the |
|---|
| 56 | // <textarea>, or inside a <head><script> in a |
|---|
| 57 | // window.onload event handler. |
|---|
| 58 | |
|---|
| 59 | // Replace the <textarea id="editor"> with an CKEditor |
|---|
| 60 | // instance, using default configurations. |
|---|
| 61 | CKEDITOR.replace( 'editor2', { |
|---|
| 62 | toolbar: [['Styles', 'Format'],['Bold', 'Italic', 'NumberedList', 'BulletedList', 'Link']], |
|---|
| 63 | height: 100, |
|---|
| 64 | width: "225px", |
|---|
| 65 | enterMode : CKEDITOR.ENTER_BR, |
|---|
| 66 | resize_enabled: false |
|---|
| 67 | } |
|---|
| 68 | ); |
|---|
| 69 | |
|---|
| 70 | //]]> |
|---|
| 71 | </script> |
|---|
| 72 | </p> |
|---|
| 73 | |
|---|
| 74 | </td> |
|---|
| 75 | </tr> |
|---|
| 76 | </table> |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | </body> |
|---|
| 80 | </html> |
|---|