JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.3
[ckeditor.git] / _samples / devtools.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 DevTools 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 Developer Tools 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>Developer Tools</strong> (<code>devtools</code>) plugin that displays\r
22                 information about dialog window elements, including the name of the dialog window,\r
23                 tab, and UI element. Please note that the tooltip also contains a link to the\r
24                 <a href="http://docs.cksource.com/ckeditor_api/">CKEditor JavaScript API</a>\r
25                 documentation for each of the selected elements.\r
26         </p>\r
27         <p>\r
28                 This plugin is aimed at developers who would like to customize their CKEditor\r
29                 instances and create their own plugins. By default it is turned off; it is\r
30                 usually useful to only turn it on in the development phase. Note that it works with\r
31                 all CKEditor dialog windows, including the ones that were created by custom plugins.\r
32         </p>\r
33         <p>\r
34                 To add a CKEditor instance using the <strong>devtools</strong> plugin, insert\r
35                 the following JavaScript call into your code:\r
36         </p>\r
37         <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',\r
38         {\r
39                 <strong>extraPlugins : 'devtools'</strong>\r
40         });</pre>\r
41         <p>\r
42                 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of\r
43                 the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor.\r
44         </p>\r
45         </div>\r
46 \r
47         <!-- This <div> holds alert messages to be display in the sample page. -->\r
48         <div id="alerts">\r
49                 <noscript>\r
50                         <p>\r
51                                 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript\r
52                                 support, like yours, you should still see the contents (HTML data) and you should\r
53                                 be able to edit it normally, without a rich editor interface.\r
54                         </p>\r
55                 </noscript>\r
56         </div>\r
57         <form action="sample_posteddata.php" method="post">\r
58                 <p>\r
59                         <label for="editor1">\r
60                                 Editor 1:</label>\r
61                         <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>\r
62                         <script type="text/javascript">\r
63                         //<![CDATA[\r
64 \r
65                                 // This call can be placed at any point after the\r
66                                 // <textarea>, or inside a <head><script> in a\r
67                                 // window.onload event handler.\r
68 \r
69                                 // Replace the <textarea id="editor"> with an CKEditor\r
70                                 // instance, using default configurations.\r
71                                 CKEDITOR.replace( 'editor1' ,\r
72                                 {\r
73                                         extraPlugins : 'devtools'\r
74                                 });\r
75 \r
76                         //]]>\r
77                         </script>\r
78                 </p>\r
79                 <p>\r
80                         <input type="submit" value="Submit" />\r
81                 </p>\r
82         </form>\r
83         <div id="footer">\r
84                 <hr />\r
85                 <p>\r
86                         CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>\r
87                 </p>\r
88                 <p id="copy">\r
89                         Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico\r
90                         Knabben. All rights reserved.\r
91                 </p>\r
92         </div>\r
93 </body>\r
94 </html>\r