国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.6KB

  1. <!DOCTYPE html>
  2. <!--
  3. Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  4. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  5. -->
  6. <html lang="en">
  7. <head>
  8. <meta charset="utf-8">
  9. <title>Using DevTools Plugin &mdash; CKEditor Sample</title>
  10. <script src="../../../ckeditor.js"></script>
  11. <link rel="stylesheet" href="../../../samples/old/sample.css">
  12. <meta name="ckeditor-sample-name" content="Developer Tools plugin">
  13. <meta name="ckeditor-sample-group" content="Plugins">
  14. <meta name="ckeditor-sample-description" content="Using the Developer Tools plugin to display information about dialog window UI elements to allow for easier customization.">
  15. <meta name="description" content="Try the latest sample of CKEditor 4 and learn more about customizing your WYSIWYG editor with endless possibilities.">
  16. </head>
  17. <body>
  18. <h1 class="samples">
  19. <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Using the Developer Tools Plugin
  20. </h1>
  21. <div class="warning deprecated">
  22. This sample is not maintained anymore. Check out its <a href="https://ckeditor.com/docs/ckeditor4/latest/examples/devtools.html">brand new version in CKEditor Examples</a>.
  23. </div>
  24. <div class="description">
  25. <p>
  26. This sample shows how to configure CKEditor instances to use the
  27. <strong>Developer Tools</strong> (<code>devtools</code>) plugin that displays
  28. information about dialog window elements, including the name of the dialog window,
  29. tab, and UI element. Please note that the tooltip also contains a link to the
  30. <a href="https://ckeditor.com/docs/ckeditor4/latest/api/index.html">CKEditor JavaScript API</a>
  31. documentation for each of the selected elements.
  32. </p>
  33. <p>
  34. This plugin is aimed at developers who would like to customize their CKEditor
  35. instances and create their own plugins. By default it is turned off; it is
  36. usually useful to only turn it on in the development phase. Note that it works with
  37. all CKEditor dialog windows, including the ones that were created by custom plugins.
  38. </p>
  39. <p>
  40. To add a CKEditor instance using the <strong>devtools</strong> plugin, insert
  41. the following JavaScript call into your code:
  42. </p>
  43. <pre class="samples">
  44. CKEDITOR.replace( '<em>textarea_id</em>', {
  45. <strong>extraPlugins: 'devtools'</strong>
  46. });</pre>
  47. <p>
  48. Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
  49. the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor.
  50. </p>
  51. </div>
  52. <form action="../../../samples/sample_posteddata.php" method="post">
  53. <p>
  54. <label for="editor1">
  55. Editor 1:
  56. </label>
  57. <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="https://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
  58. <script>
  59. // This call can be placed at any point after the
  60. // <textarea>, or inside a <head><script> in a
  61. // window.onload event handler.
  62. // Replace the <textarea id="editor"> with an CKEditor
  63. // instance, using default configurations.
  64. CKEDITOR.replace( 'editor1', {
  65. extraPlugins: 'devtools'
  66. });
  67. </script>
  68. </p>
  69. <p>
  70. <input type="submit" value="Submit">
  71. </p>
  72. </form>
  73. <div id="footer">
  74. <hr>
  75. <p>
  76. CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">https://ckeditor.com</a>
  77. </p>
  78. <p id="copy">
  79. Copyright &copy; 2003-2020, <a class="samples" href="https://cksource.com/">CKSource</a> - Frederico
  80. Knabben. All rights reserved.
  81. </p>
  82. </div>
  83. </body>
  84. </html>