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