devtools.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 &mdash; 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. <h1 class="samples">
  16. CKEditor Sample &mdash; Using the Developer Tools Plugin
  17. </h1>
  18. <div class="description">
  19. <p>
  20. This sample shows how to configure CKEditor instances to use the
  21. <strong>Developer Tools</strong> (<code>devtools</code>) plugin that displays
  22. information about dialog window elements, including the name of the dialog window,
  23. tab, and UI element. Please note that the tooltip also contains a link to the
  24. <a href="http://docs.cksource.com/ckeditor_api/">CKEditor JavaScript API</a>
  25. documentation for each of the selected elements.
  26. </p>
  27. <p>
  28. This plugin is aimed at developers who would like to customize their CKEditor
  29. instances and create their own plugins. By default it is turned off; it is
  30. usually useful to only turn it on in the development phase. Note that it works with
  31. all CKEditor dialog windows, including the ones that were created by custom plugins.
  32. </p>
  33. <p>
  34. To add a CKEditor instance using the <strong>devtools</strong> plugin, insert
  35. the following JavaScript call into your code:
  36. </p>
  37. <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
  38. {
  39. <strong>extraPlugins : 'devtools'</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>&lt;textarea&gt;</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>
  60. <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>
  61. <script type="text/javascript">
  62. //<![CDATA[
  63. // This call can be placed at any point after the
  64. // <textarea>, or inside a <head><script> in a
  65. // window.onload event handler.
  66. // Replace the <textarea id="editor"> with an CKEditor
  67. // instance, using default configurations.
  68. CKEDITOR.replace( 'editor1' ,
  69. {
  70. extraPlugins : 'devtools'
  71. });
  72. //]]>
  73. </script>
  74. </p>
  75. <p>
  76. <input type="submit" value="Submit" />
  77. </p>
  78. </form>
  79. <div id="footer">
  80. <hr />
  81. <p>
  82. CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
  83. </p>
  84. <p id="copy">
  85. Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
  86. Knabben. All rights reserved.
  87. </p>
  88. </div>
  89. </body>
  90. </html>