3 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4 For licensing, see LICENSE.md or http://ckeditor.com/license
9 <title>UI Color Picker
— 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=
"UIColor plugin">
13 <meta name=
"ckeditor-sample-group" content=
"Plugins">
14 <meta name=
"ckeditor-sample-description" content=
"Using the UIColor plugin to pick up skin color.">
18 <a href=
"../../../samples/old/index.html">CKEditor Samples
</a> » UI Color Plugin
20 <div class=
"warning deprecated">
21 This sample is not maintained anymore. Check out its
<a href=
"http://sdk.ckeditor.com/samples/uicolorpicker.html">brand new version in CKEditor SDK
</a>.
23 <div class=
"description">
25 This sample shows how to use the UI Color picker toolbar button to preview the skin color of the editor.
26 <strong>Note:
</strong>The UI skin color feature depends on the CKEditor skin
27 compatibility. The Moono and Kama skins are examples of skins that work with it.
30 <form action=
"../../../samples/sample_posteddata.php" method=
"post">
31 <div id=
"ui-color-plugin">
33 If the
<strong>uicolor
</strong> plugin along with the dedicated
<strong>UIColor
</strong>
34 toolbar button is added to CKEditor, the user will also be able to pick the color of the
35 UI from the color palette available in the
<strong>UI Color Picker
</strong> dialog window.
38 To insert a CKEditor instance with the
<strong>uicolor
</strong> plugin enabled,
39 use the following JavaScript call:
42 CKEDITOR.replace( '
<em>textarea_id
</em>', {
43 <strong>extraPlugins: 'uicolor',
</strong>
44 toolbar: [ [ 'Bold', 'Italic' ], [
<strong>'UIColor'
</strong> ] ]
46 <h2>Used in themed instance
</h2>
48 Click the
<strong>UI Color Picker
</strong> toolbar button to open up a color picker dialog.
51 <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>
54 // Replace the <textarea id="editor"> with an CKEditor
55 // instance, using default configurations.
56 CKEDITOR
.replace( 'editor1', {
57 extraPlugins
: 'uicolor',
59 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
60 [ 'FontSize', 'TextColor', 'BGColor' ],
67 <h2>Used in inline instance
</h2>
69 Click the below editable region to display floating toolbar, then click
<strong>UI Color Picker
</strong> button.
71 <div id=
"editor2" contenteditable=
"true">
72 <p>This is some
<strong>sample text
</strong>. You are using
<a data-cke-saved-href=
"http://ckeditor.com/" href=
"http://ckeditor.com/">CKEditor
</a>.
</p>
76 // Disable automatic creation of inline instances.
77 CKEDITOR
.disableAutoInline
= true;
79 // Replace the <div id="editor3"> with an inline CKEditor instance.
80 CKEDITOR
.inline( 'editor2', {
81 extraPlugins
: 'uicolor',
83 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
84 [ 'FontSize', 'TextColor', 'BGColor' ],
92 <input type=
"submit" value=
"Submit">
98 CKEditor - The text editor for the Internet -
<a class=
"samples" href=
"http://ckeditor.com/">http://ckeditor.com
</a>
101 Copyright
© 2003-
2017,
<a class=
"samples" href=
"http://cksource.com/">CKSource
</a> - Frederico
102 Knabben. All rights reserved.