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