1 |
85ad3d82
|
Assos Assos
|
<!DOCTYPE html>
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
<html>
|
7 |
|
|
<head>
|
8 |
|
|
<title>UI Color Picker — CKEditor Sample</title>
|
9 |
|
|
<meta charset="utf-8">
|
10 |
|
|
<script src="../../../ckeditor.js"></script>
|
11 |
|
|
<link rel="stylesheet" href="../../../samples/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.">
|
15 |
|
|
</head>
|
16 |
|
|
<body>
|
17 |
|
|
<h1 class="samples">
|
18 |
|
|
<a href="../../../samples/index.html">CKEditor Samples</a> » UI Color Plugin
|
19 |
|
|
</h1>
|
20 |
|
|
<div class="description">
|
21 |
|
|
<p>
|
22 |
|
|
This sample shows how to use the UI Color picker toolbar button to preview the skin color of the editor.
|
23 |
|
|
<strong>Note:</strong>The UI skin color feature depends on the CKEditor skin
|
24 |
|
|
compatibility. The Moono and Kama skins are examples of skins that work with it.
|
25 |
|
|
</p>
|
26 |
|
|
</div>
|
27 |
|
|
<form action="../../../samples/sample_posteddata.php" method="post">
|
28 |
|
|
<div id="ui-color-plugin">
|
29 |
|
|
<p>
|
30 |
|
|
If the <strong>uicolor</strong> plugin along with the dedicated <strong>UIColor</strong>
|
31 |
|
|
toolbar button is added to CKEditor, the user will also be able to pick the color of the
|
32 |
|
|
UI from the color palette available in the <strong>UI Color Picker</strong> dialog window.
|
33 |
|
|
</p>
|
34 |
|
|
<p>
|
35 |
|
|
To insert a CKEditor instance with the <strong>uicolor</strong> plugin enabled,
|
36 |
|
|
use the following JavaScript call:
|
37 |
|
|
</p>
|
38 |
|
|
<pre class="samples">
|
39 |
|
|
CKEDITOR.replace( '<em>textarea_id</em>', {
|
40 |
|
|
<strong>extraPlugins: 'uicolor',</strong>
|
41 |
|
|
toolbar: [ [ 'Bold', 'Italic' ], [ <strong>'UIColor'</strong> ] ]
|
42 |
|
|
});</pre>
|
43 |
|
|
<h2>Used in themed instance</h2>
|
44 |
|
|
<p>
|
45 |
|
|
Click the <strong>UI Color Picker</strong> toolbar button to open up a color picker dialog.
|
46 |
|
|
</p>
|
47 |
|
|
<p>
|
48 |
|
|
<textarea cols="80" id="editor1" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
49 |
|
|
<script>
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
CKEDITOR.replace( 'editor1', {
|
54 |
|
|
extraPlugins: 'uicolor',
|
55 |
|
|
toolbar: [
|
56 |
|
|
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
|
57 |
|
|
[ 'FontSize', 'TextColor', 'BGColor' ],
|
58 |
|
|
[ 'UIColor' ]
|
59 |
|
|
]
|
60 |
|
|
});
|
61 |
|
|
|
62 |
|
|
</script>
|
63 |
|
|
</p>
|
64 |
|
|
<h2>Used in inline instance</h2>
|
65 |
|
|
<p>
|
66 |
|
|
Click the below editable region to display floating toolbar, then click <strong>UI Color Picker</strong> button.
|
67 |
|
|
</p>
|
68 |
|
|
<div id="editor2" contenteditable="true">
|
69 |
|
|
<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>
|
70 |
|
|
</div>
|
71 |
|
|
<script>
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
CKEDITOR.disableAutoInline = true;
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
CKEDITOR.inline( 'editor2', {
|
78 |
|
|
extraPlugins: 'uicolor',
|
79 |
|
|
toolbar: [
|
80 |
|
|
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
|
81 |
|
|
[ 'FontSize', 'TextColor', 'BGColor' ],
|
82 |
|
|
[ 'UIColor' ]
|
83 |
|
|
]
|
84 |
|
|
});
|
85 |
|
|
|
86 |
|
|
</script>
|
87 |
|
|
</div>
|
88 |
|
|
<p>
|
89 |
|
|
<input type="submit" value="Submit">
|
90 |
|
|
</p>
|
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 © 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
99 |
|
|
Knabben. All rights reserved.
|
100 |
|
|
</p>
|
101 |
|
|
</div>
|
102 |
|
|
</body>
|
103 |
|
|
</html> |