skins.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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>Skins &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; Skins
  17. </h1>
  18. <div class="description">
  19. <p>
  20. This sample shows how to automatically replace <code>&lt;textarea&gt;</code> elements
  21. with a CKEditor instance using a specific <a class="samples" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.skin">skin</a>.
  22. </p>
  23. <p>
  24. CKEditor with a specified skin (in this case, the "Office 2003" skin) is inserted with a JavaScript call using the following code:
  25. </p>
  26. <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
  27. {
  28. <strong>skin : 'office2003'</strong>
  29. });</pre>
  30. <p>
  31. Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
  32. the <code>&lt;textarea&gt;</code> element to be replaced.
  33. </p>
  34. </div>
  35. <!-- This <div> holds alert messages to be display in the sample page. -->
  36. <div id="alerts">
  37. <noscript>
  38. <p>
  39. <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
  40. support, like yours, you should still see the contents (HTML data) and you should
  41. be able to edit it normally, without a rich editor interface.
  42. </p>
  43. </noscript>
  44. </div>
  45. <form action="sample_posteddata.php" method="post">
  46. <h2 class="samples">&quot;Kama&quot; skin</h2>
  47. <p>The default skin used in CKEditor. No additional configuration is required.</p>
  48. <p>
  49. <textarea cols="80" id="editor_kama" name="editor_kama" 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>
  50. <script type="text/javascript">
  51. //<![CDATA[
  52. CKEDITOR.replace( 'editor_kama',
  53. {
  54. skin : 'kama'
  55. });
  56. //]]>
  57. </script>
  58. </p>
  59. <h2 class="samples">&quot;Office 2003&quot; skin</h2>
  60. <p>Use the following code to configure a CKEditor instance to use the "Office 2003" skin.</p>
  61. <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
  62. {
  63. <strong>skin : 'office2003'</strong>
  64. });</pre>
  65. <p>
  66. <textarea cols="80" id="editor_office2003" name="editor_office2003" 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>
  67. <script type="text/javascript">
  68. //<![CDATA[
  69. CKEDITOR.replace( 'editor_office2003',
  70. {
  71. skin : 'office2003'
  72. });
  73. //]]>
  74. </script>
  75. </p>
  76. <h2 class="samples">&quot;V2&quot; skin</h2>
  77. <p>Use the following code to configure a CKEditor instance to use the "V2" skin.</p>
  78. <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
  79. {
  80. <strong>skin : 'v2'</strong>
  81. });</pre>
  82. <textarea cols="80" id="editor_v2" name="editor_v2" 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>
  83. <script type="text/javascript">
  84. //<![CDATA[
  85. CKEDITOR.replace( 'editor_v2',
  86. {
  87. skin : 'v2'
  88. });
  89. //]]>
  90. </script>
  91. </form>
  92. <div id="footer">
  93. <hr />
  94. <p>
  95. CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
  96. </p>
  97. <p id="copy">
  98. Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
  99. Knabben. All rights reserved.
  100. </p>
  101. </div>
  102. </body>
  103. </html>