1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\r
3 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
\r
4 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
6 <html xmlns="http://www.w3.org/1999/xhtml">
\r
8 <title>UI Color Picker — CKEditor Sample</title>
\r
9 <meta content="text/html; charset=utf-8" http-equiv="content-type" />
\r
10 <script type="text/javascript" src="../ckeditor.js"></script>
\r
11 <script src="sample.js" type="text/javascript"></script>
\r
12 <link href="sample.css" rel="stylesheet" type="text/css" />
\r
15 <h1 class="samples">
\r
16 CKEditor Sample — UI Color Picker
\r
18 <div class="description">
\r
20 This sample shows how to automatically replace <code><textarea></code> elements
\r
21 with a CKEditor instance with an option to change the color of its user interface.
\r
23 <h2 class="samples">Setting the User Interface Color</h2>
\r
25 To specify the color of the user interface, set the <code>uiColor</code> property:
\r
27 <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
\r
29 <strong>uiColor: '#EE0000'</strong>
\r
32 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
\r
33 the <code><textarea></code> element to be replaced.
\r
35 <h2 class="samples">Enabling the Color Picker</h2>
\r
37 If the <strong>uicolor</strong> plugin along with the dedicated <strong>UIColor</strong>
\r
38 toolbar button is added to CKEditor, the user will also be able to pick the color of the
\r
39 UI from the color palette available in the <strong>UI Color Picker</strong> dialog window.
\r
42 To insert a CKEditor instance with the <strong>uicolor</strong> plugin enabled,
\r
43 use the following JavaScript call:
\r
45 <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
\r
47 <strong>extraPlugins : 'uicolor',</strong>
\r
48 toolbar : [ [ 'Bold', 'Italic' ], [ <strong>'UIColor'</strong> ] ]
\r
51 <!-- This <div> holds alert messages to be display in the sample page. -->
\r
55 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
\r
56 support, like yours, you should still see the contents (HTML data) and you should
\r
57 be able to edit it normally, without a rich editor interface.
\r
62 Click the <strong>UI Color Picker</strong> button to test your color preferences at runtime.
\r
65 The first editor instance includes the <strong>UI Color Picker</strong> toolbar button,
\r
66 but the default UI color is not defined, so the editor uses the skin color.
\r
68 <form action="sample_posteddata.php" method="post">
\r
70 <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>
\r
71 <script type="text/javascript">
\r
74 // Replace the <textarea id="editor"> with an CKEditor
\r
75 // instance, using default configurations.
\r
76 CKEDITOR.replace( 'editor1',
\r
78 extraPlugins : 'uicolor',
\r
81 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
\r
90 The second editor instance includes the <strong>UI Color Picker</strong> toolbar button. The
\r
91 default UI color was defined, so the skin color is not used.
\r
94 <textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
\r
95 <script type="text/javascript">
\r
98 // Replace the <textarea id="editor"> with an CKEditor
\r
99 // instance, using default configurations.
\r
100 CKEDITOR.replace( 'editor2',
\r
102 extraPlugins : 'uicolor',
\r
103 uiColor: '#14B8C4',
\r
106 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
\r
115 <input type="submit" value="Submit" />
\r
121 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
\r
124 Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
\r
125 Knabben. All rights reserved.
\r