| | 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>Using TableResize Plugin — CKEditor Sample</title> |
| | 9 | <meta content="text/html; charset=utf-8" http-equiv="content-type" /> |
| | 10 | <!-- CKReleaser %REMOVE_LINE% |
| | 11 | <script type="text/javascript" src="../ckeditor.js"></script> |
| | 12 | CKReleaser %REMOVE_START% --> |
| | 13 | <script type="text/javascript" src="../ckeditor_source.js"></script> |
| | 14 | <!-- CKReleaser %REMOVE_END% --> |
| | 15 | <script src="sample.js" type="text/javascript"></script> |
| | 16 | <link href="sample.css" rel="stylesheet" type="text/css" /> |
| | 17 | </head> |
| | 18 | <body> |
| | 19 | <h1 class="samples"> |
| | 20 | CKEditor Sample — Using the TableResize Plugin |
| | 21 | </h1> |
| | 22 | <div class="description"> |
| | 23 | <p> |
| | 24 | This sample shows how to configure CKEditor instances to use the |
| | 25 | <strong>TableResize</strong> (<code>tableresize</code>) plugin that allows |
| | 26 | the user to edit table columns by using the mouse. |
| | 27 | </p> |
| | 28 | <p> |
| | 29 | The TableResize plugin makes it possible to modify table column width. Hover |
| | 30 | your mouse over the column border to see the cursor change to indicate that |
| | 31 | the column can be resized. Click and drag your mouse to set the desired width. |
| | 32 | </p> |
| | 33 | <p> |
| | 34 | By default the plugin is turned off. To add a CKEditor instance using the |
| | 35 | TableResize plugin, insert the following JavaScript call into your code: |
| | 36 | </p> |
| | 37 | <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>', |
| | 38 | { |
| | 39 | <strong>extraPlugins : 'tableresize'</strong> |
| | 40 | });</pre> |
| | 41 | <p> |
| | 42 | Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of |
| | 43 | the <code><textarea></code> element to be replaced with CKEditor. |
| | 44 | </p> |
| | 45 | </div> |
| | 46 | <!-- This <div> holds alert messages to be display in the sample page. --> |
| | 47 | <div id="alerts"> |
| | 48 | <noscript> |
| | 49 | <p> |
| | 50 | <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript |
| | 51 | support, like yours, you should still see the contents (HTML data) and you should |
| | 52 | be able to edit it normally, without a rich editor interface. |
| | 53 | </p> |
| | 54 | </noscript> |
| | 55 | </div> |
| | 56 | <form action="sample_posteddata.php" method="post"> |
| | 57 | <p> |
| | 58 | <label for="editor1"> |
| | 59 | Editor 1:</label><br /> |
| | 60 | <textarea cols="80" id="editor1" name="editor1" rows="10"> |
| | 61 | <table style="width: 500px;"> |
| | 62 | <caption> |
| | 63 | A sample table</caption> |
| | 64 | <tbody> |
| | 65 | <tr> |
| | 66 | <td> |
| | 67 | Column 1</td> |
| | 68 | <td> |
| | 69 | Column 2</td> |
| | 70 | </tr> |
| | 71 | <tr> |
| | 72 | <td> |
| | 73 | You can resize a table column.</td> |
| | 74 | <td> |
| | 75 | Hover your mouse over its border.</td> |
| | 76 | </tr> |
| | 77 | <tr> |
| | 78 | <td> |
| | 79 | Watch the cursor change.</td> |
| | 80 | <td> |
| | 81 | Now click and drag to resize.</td> |
| | 82 | </tr> |
| | 83 | </tbody> |
| | 84 | </table> |
| | 85 | |
| | 86 | |
| | 87 | </textarea> |
| | 88 | <script type="text/javascript"> |
| | 89 | //<![CDATA[ |
| | 90 | |
| | 91 | // This call can be placed at any point after the |
| | 92 | // <textarea>, or inside a <head><script> in a |
| | 93 | // window.onload event handler. |
| | 94 | |
| | 95 | // Replace the <textarea id="editor"> with an CKEditor |
| | 96 | // instance, using default configurations. |
| | 97 | CKEDITOR.replace( 'editor1', { |
| | 98 | extraPlugins : 'tableresize' |
| | 99 | }); |
| | 100 | |
| | 101 | //]]> |
| | 102 | </script> |
| | 103 | </p> |
| | 104 | <p> |
| | 105 | <input type="submit" value="Submit" /> |
| | 106 | </p> |
| | 107 | </form> |
| | 108 | <div id="footer"> |
| | 109 | <hr /> |
| | 110 | <p> |
| | 111 | CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> |
| | 112 | </p> |
| | 113 | <p id="copy"> |
| | 114 | Copyright © 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico |
| | 115 | Knabben. All rights reserved. |
| | 116 | </p> |
| | 117 | </div> |
| | 118 | </body> |
| | 119 | </html> |