3 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
\r
4 For licensing, see LICENSE.md or http://ckeditor.com/license
\r
8 <title>Massive inline editing — CKEditor Sample</title>
\r
9 <meta charset="utf-8">
\r
10 <script src="../ckeditor.js"></script>
\r
13 // This code is generally not necessary, but it is here to demonstrate
\r
14 // how to customize specific editor instances on the fly. This fits well
\r
15 // this demo because we have editable elements (like headers) that
\r
16 // require less features.
\r
18 // The "instanceCreated" event is fired for every editor instance created.
\r
19 CKEDITOR.on( 'instanceCreated', function( event ) {
\r
20 var editor = event.editor,
\r
21 element = editor.element;
\r
23 // Customize editors for headers and tag list.
\r
24 // These editors don't need features like smileys, templates, iframes etc.
\r
25 if ( element.is( 'h1', 'h2', 'h3' ) || element.getAttribute( 'id' ) == 'taglist' ) {
\r
26 // Customize the editor configurations on "configLoaded" event,
\r
27 // which is fired after the configuration file loading and
\r
28 // execution. This makes it possible to change the
\r
29 // configurations before the editor initialization takes place.
\r
30 editor.on( 'configLoaded', function() {
\r
32 // Remove unnecessary plugins to make the editor simpler.
\r
33 editor.config.removePlugins = 'colorbutton,find,flash,font,' +
\r
34 'forms,iframe,image,newpage,removeformat,' +
\r
35 'smiley,specialchar,stylescombo,templates';
\r
37 // Rearrange the layout of the toolbar.
\r
38 editor.config.toolbarGroups = [
\r
39 { name: 'editing', groups: [ 'basicstyles', 'links' ] },
\r
41 { name: 'clipboard', groups: [ 'selection', 'clipboard' ] },
\r
49 <link href="sample.css" rel="stylesheet">
\r
52 /* The following styles are just to make the page look nice. */
\r
54 /* Workaround to show Arial Black in Firefox. */
\r
57 font-family: 'arial-black';
\r
58 src: local('Arial Black');
\r
61 *[contenteditable="true"]
\r
69 margin: 30px auto 0;
\r
76 border-bottom: 5px solid #05B2D2;
\r
90 padding: 10px 1px 1px;
\r
99 font-weight: normal;
\r
104 font-family: "Arial Black",arial-black;
\r
106 line-height: 1.1em;
\r
107 text-transform: uppercase;
\r
113 line-height: 1.1em;
\r
126 line-height: 1.8em;
\r
127 text-align: justify;
\r
139 margin: 0 0 0 30px;
\r
157 #columns #column1 > div
\r
162 #columns #column3 > div
\r
167 #columns > div > div
\r
170 padding: 10px 20px;
\r
173 #columns blockquote
\r
180 border-top: 5px solid #05B2D2;
\r
185 display: inline-block;
\r
188 margin: 0 0 0 20px;
\r
195 <h1 class="samples"><a href="index.html">CKEditor Samples</a> » Massive inline editing</h1>
\r
196 <div class="description">
\r
197 <p>This sample page demonstrates the inline editing feature - CKEditor instances will be created automatically from page elements with <strong>contentEditable</strong> attribute set to value <strong>true</strong>:</p>
\r
198 <pre class="samples"><div <strong>contenteditable="true</strong>" > ... </div></pre>
\r
199 <p>Click inside of any element below to start editing.</p>
\r
202 <div id="container">
\r
204 <div id="headerLeft">
\r
205 <h2 id="sampleTitle" contenteditable="true">
\r
206 CKEditor<br> Goes Inline!
\r
208 <h3 contenteditable="true">
\r
209 Lorem ipsum dolor sit amet dolor duis blandit vestibulum faucibus a, tortor.
\r
212 <div id="headerRight">
\r
213 <div contenteditable="true">
\r
215 Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
\r
218 Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis ac, laoreet enim. Phasellus fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet magna. Vestibulum dapibus, mauris nec malesuada fames ac.
\r
225 <div contenteditable="true">
\r
227 Fusce vitae porttitor
\r
231 Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor.
\r
235 Proin nunc justo felis mollis tincidunt, risus risus pede, posuere cubilia Curae, Nullam euismod, enim. Etiam nibh ultricies dolor ac dignissim erat volutpat. Vivamus fermentum <a href="http://ckeditor.com/">nisl nulla sem in</a> metus. Maecenas wisi. Donec nec erat volutpat.
\r
239 Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium.
\r
240 Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum
\r
245 Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla. Phasellus ultrices, velit ac arcu.
\r
248 <p>Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.</p>
\r
249 <p><s>Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.</s></p>
\r
253 <div contenteditable="true">
\r
255 Integer condimentum sit amet
\r
258 <strong>Aenean nonummy a, mattis varius. Cras aliquet.</strong>
\r
259 Praesent <a href="http://ckeditor.com/">magna non mattis ac, rhoncus nunc</a>, rhoncus eget, cursus pulvinar mollis.</p>
\r
260 <p>Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.</p>
\r
261 <p>Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla ligula quis eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum. Nunc viverra enim quis diam.</p>
\r
263 <div contenteditable="true">
\r
265 Praesent wisi accumsan sit amet nibh
\r
267 <p>Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.</p>
\r
268 <p style="margin-left: 40px; ">Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio at eros. Fusce <a href="http://ckeditor.com/">gravida, erat vitae augue</a>. Fusce urna fringilla gravida.</p>
\r
269 <p>In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a, lacinia quam sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In hac habitasse platea dictumst. Nam sed laoreet sit amet erat. Integer.</p>
\r
273 <div contenteditable="true">
\r
275 <img src="assets/inlineall/logo.png" alt="CKEditor logo" style="float:left">
\r
277 <p>Quisque justo neque, mattis sed, fermentum ultrices <strong>posuere cubilia Curae</strong>, Vestibulum elit metus, quis placerat ut, lectus. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.</p>
\r
279 Nullam laoreet vel consectetuer tellus suscipit
\r
282 <li>Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.</li>
\r
283 <li>Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi.</li>
\r
284 <li>Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</li>
\r
286 <p>Quisque justo neque, mattis sed, <a href="http://ckeditor.com/">fermentum ultrices posuere cubilia</a> Curae, Vestibulum elit metus, quis placerat ut, lectus.</p>
\r
287 <p>Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis.</p>
\r
288 <p>Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi. Sed in nonummy faucibus turpis. Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</p>
\r
293 Tags of this article:
\r
294 <p id="taglist" contenteditable="true">
\r
295 inline, editing, floating, CKEditor
\r
302 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
\r
303 http://ckeditor.com</a>
\r
306 Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
\r
307 - Frederico Knabben. All rights reserved.
\r