3 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
\r
4 For licensing, see LICENSE.md or http://ckeditor.com/license
\r
8 <meta charset="utf-8">
\r
9 <title>Massive inline editing — CKEditor Sample</title>
\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
107 text-transform: uppercase;
\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="warning deprecated">
\r
197 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/inline.html">brand new version in CKEditor SDK</a>.
\r
199 <div class="description">
\r
200 <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
201 <pre class="samples"><div <strong>contenteditable="true</strong>" > ... </div></pre>
\r
202 <p>Click inside of any element below to start editing.</p>
\r
205 <div id="container">
\r
207 <div id="headerLeft">
\r
208 <h2 id="sampleTitle" contenteditable="true">
\r
209 CKEditor<br> Goes Inline!
\r
211 <h3 contenteditable="true">
\r
212 Lorem ipsum dolor sit amet dolor duis blandit vestibulum faucibus a, tortor.
\r
215 <div id="headerRight">
\r
216 <div contenteditable="true">
\r
218 Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
\r
221 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
228 <div contenteditable="true">
\r
230 Fusce vitae porttitor
\r
234 Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor.
\r
238 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
242 Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium.
\r
243 Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum
\r
248 Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla. Phasellus ultrices, velit ac arcu.
\r
251 <p>Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.</p>
\r
252 <p><s>Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.</s></p>
\r
256 <div contenteditable="true">
\r
258 Integer condimentum sit amet
\r
261 <strong>Aenean nonummy a, mattis varius. Cras aliquet.</strong>
\r
262 Praesent <a href="http://ckeditor.com/">magna non mattis ac, rhoncus nunc</a>, rhoncus eget, cursus pulvinar mollis.</p>
\r
263 <p>Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.</p>
\r
264 <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
266 <div contenteditable="true">
\r
268 Praesent wisi accumsan sit amet nibh
\r
270 <p>Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.</p>
\r
271 <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
272 <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
276 <div contenteditable="true">
\r
278 <img src="assets/inlineall/logo.png" alt="CKEditor logo" style="float:left">
\r
280 <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
282 Nullam laoreet vel consectetuer tellus suscipit
\r
285 <li>Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.</li>
\r
286 <li>Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi.</li>
\r
287 <li>Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</li>
\r
289 <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
290 <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
291 <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
296 Tags of this article:
\r
297 <p id="taglist" contenteditable="true">
\r
298 inline, editing, floating, CKEditor
\r
305 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
\r
306 http://ckeditor.com</a>
\r
309 Copyright © 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a>
\r
310 - Frederico Knabben. All rights reserved.
\r