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.

69 lines
2.4 KiB

  1. <!DOCTYPE html>
  2. <!--
  3. Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
  4. For licensing, see LICENSE.md or http://ckeditor.com/license
  5. -->
  6. <html>
  7. <head>
  8. <meta charset="utf-8">
  9. <title>UI Color Picker &mdash; CKEditor Sample</title>
  10. <script src="../ckeditor.js"></script>
  11. <link rel="stylesheet" href="sample.css">
  12. </head>
  13. <body>
  14. <h1 class="samples">
  15. <a href="index.html">CKEditor Samples</a> &raquo; UI Color
  16. </h1>
  17. <div class="description">
  18. <p>
  19. This sample shows how to automatically replace <code>&lt;textarea&gt;</code> elements
  20. with a CKEditor instance with an option to change the color of its user interface.<br>
  21. <strong>Note:</strong>The UI skin color feature depends on the CKEditor skin
  22. compatibility. The Moono and Kama skins are examples of skins that work with it.
  23. </p>
  24. </div>
  25. <form action="sample_posteddata.php" method="post">
  26. <p>
  27. This editor instance has a UI color value defined in configuration to change the skin color,
  28. To specify the color of the user interface, set the <code>uiColor</code> property:
  29. </p>
  30. <pre class="samples">
  31. CKEDITOR.replace( '<em>textarea_id</em>', {
  32. <strong>uiColor: '#14B8C4'</strong>
  33. });</pre>
  34. <p>
  35. Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
  36. the <code>&lt;textarea&gt;</code> element to be replaced.
  37. </p>
  38. <p>
  39. <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>
  40. <script>
  41. // Replace the <textarea id="editor"> with an CKEditor
  42. // instance, using default configurations.
  43. CKEDITOR.replace( 'editor1', {
  44. uiColor: '#14B8C4',
  45. toolbar: [
  46. [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
  47. [ 'FontSize', 'TextColor', 'BGColor' ]
  48. ]
  49. });
  50. </script>
  51. </p>
  52. <p>
  53. <input type="submit" value="Submit">
  54. </p>
  55. </form>
  56. <div id="footer">
  57. <hr>
  58. <p>
  59. CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
  60. </p>
  61. <p id="copy">
  62. Copyright &copy; 2003-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
  63. Knabben. All rights reserved.
  64. </p>
  65. </div>
  66. </body>
  67. </html>