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