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-2011, 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>Shared Toolbars — 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
13 <style id="styles" type="text/css">
\r
19 border: solid 1px #555;
\r
27 <h1 class="samples">
\r
28 CKEditor Sample — Shared Toolbars
\r
30 <div class="description">
\r
32 This sample shows how to configure multiple CKEditor instances to share some parts of the interface.
\r
33 You can choose to share the toolbar (<code>topSpace</code>), the elements path
\r
34 (<code>bottomSpace</code>), or both.
\r
37 CKEditor instances with shared spaces can be inserted with a JavaScript call using the following code:
\r
39 <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
\r
41 <strong>sharedSpaces :
\r
44 bottom : 'bottomSpace'
\r
48 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
\r
49 the <code><textarea></code> element to be replaced with CKEditor.
\r
52 <!-- This <div> holds alert messages to be display in the sample page. -->
\r
56 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
\r
57 support, like yours, you should still see the contents (HTML data) and you should
\r
58 be able to edit it normally, without a rich editor interface.
\r
64 <form action="sample_posteddata.php" id="editorsForm" method="post">
\r
66 <label for="editor1">
\r
67 Editor 1 (uses the shared toolbar and elements path):</label>
\r
68 <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 <label for="editor2">
\r
72 Editor 2 (uses the shared toolbar and elements path):</label>
\r
73 <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
76 <label for="editor3">
\r
77 Editor 3 (uses the shared toolbar only):</label>
\r
78 <textarea cols="80" id="editor3" name="editor3" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
\r
81 <label for="editor4">
\r
82 Editor 4 (no shared spaces):</label>
\r
83 <textarea cols="80" id="editor4" name="editor4" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
\r
86 <input type="submit" value="Submit" />
\r
89 <div id="bottomSpace">
\r
94 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
\r
97 Copyright © 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
\r
98 Knabben. All rights reserved.
\r
101 <script type="text/javascript">
\r
104 // Create all editor instances at the end of the page, so we are sure
\r
105 // that the "bottomSpace" div is available in the DOM (IE issue).
\r
107 CKEDITOR.replace( 'editor1',
\r
112 bottom : 'bottomSpace'
\r
115 // Removes the maximize plugin as it's not usable
\r
116 // in a shared toolbar.
\r
117 // Removes the resizer as it's not usable in a
\r
118 // shared elements path.
\r
119 removePlugins : 'maximize,resize'
\r
122 CKEDITOR.replace( 'editor2',
\r
127 bottom : 'bottomSpace'
\r
130 // Removes the maximize plugin as it's not usable
\r
131 // in a shared toolbar.
\r
132 // Removes the resizer as it's not usable in a
\r
133 // shared elements path.
\r
134 removePlugins : 'maximize,resize'
\r
137 CKEDITOR.replace( 'editor3',
\r
144 // Removes the maximize plugin as it's not usable
\r
145 // in a shared toolbar.
\r
146 removePlugins : 'maximize'
\r
149 CKEDITOR.replace( 'editor4' );
\r