]>
git.immae.eu Git - perso/Immae/Projets/packagist/piedsjaloux-ckeditor-component.git/blob - sources/plugins/toolbar/plugin.js
2 * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
7 * @fileOverview The "toolbar" plugin. Renders the default toolbar interface in
12 var toolbox = function() {
14 this.focusCommandExecuted
= false;
17 toolbox
.prototype.focus = function() {
18 for ( var t
= 0, toolbar
; toolbar
= this.toolbars
[ t
++ ]; ) {
19 for ( var i
= 0, item
; item
= toolbar
.items
[ i
++ ]; ) {
30 modes: { wysiwyg: 1, source: 1 },
33 exec: function( editor
) {
34 if ( editor
.toolbox
) {
35 editor
.toolbox
.focusCommandExecuted
= true;
37 // Make the first button focus accessible for IE. (http://dev.ckeditor.com/ticket/3417)
38 // Adobe AIR instead need while of delay.
39 if ( CKEDITOR
.env
.ie
|| CKEDITOR
.env
.air
) {
40 setTimeout( function() {
41 editor
.toolbox
.focus();
44 editor
.toolbox
.focus();
51 CKEDITOR
.plugins
.add( 'toolbar', {
53 // jscs:disable maximumLineLength
54 lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
55 // jscs:enable maximumLineLength
57 init: function( editor
) {
60 var itemKeystroke = function( item
, keystroke
) {
62 var rtl
= editor
.lang
.dir
== 'rtl',
63 toolbarGroupCycling
= editor
.config
.toolbarGroupCycling
,
64 // Picking right/left key codes.
65 rightKeyCode
= rtl
? 37 : 39,
66 leftKeyCode
= rtl
? 39 : 37;
68 toolbarGroupCycling
= toolbarGroupCycling
=== undefined || toolbarGroupCycling
;
70 switch ( keystroke
) {
72 case CKEDITOR
.SHIFT
+ 9: // SHIFT + TAB
73 // Cycle through the toolbars, starting from the one
74 // closest to the current item.
75 while ( !toolbar
|| !toolbar
.items
.length
) {
76 if ( keystroke
== 9 ) {
77 toolbar
= ( ( toolbar
? toolbar
.next : item
.toolbar
.next
) || editor
.toolbox
.toolbars
[ 0 ] );
79 toolbar
= ( ( toolbar
? toolbar
.previous : item
.toolbar
.previous
) || editor
.toolbox
.toolbars
[ editor
.toolbox
.toolbars
.length
- 1 ] );
82 // Look for the first item that accepts focus.
83 if ( toolbar
.items
.length
) {
84 item
= toolbar
.items
[ endFlag
? ( toolbar
.items
.length
- 1 ) : 0 ];
85 while ( item
&& !item
.focus
) {
86 item
= endFlag
? item
.previous : item
.next
;
102 // Look for the next item in the toolbar.
105 // If it's the last item, cycle to the first one.
106 if ( !next
&& toolbarGroupCycling
) next
= item
.toolbar
.items
[ 0 ];
108 while ( next
&& !next
.focus
);
110 // If available, just focus it, otherwise focus the
116 itemKeystroke( item
, 9 );
119 case 40: // DOWN-ARROW
120 if ( item
.button
&& item
.button
.hasArrow
) {
123 // Send left arrow key.
124 itemKeystroke( item
, keystroke
== 40 ? rightKeyCode : leftKeyCode
);
131 // Look for the previous item in the toolbar.
132 next
= next
.previous
;
134 // If it's the first item, cycle to the last one.
135 if ( !next
&& toolbarGroupCycling
) next
= item
.toolbar
.items
[ item
.toolbar
.items
.length
- 1 ];
137 while ( next
&& !next
.focus
);
139 // If available, just focus it, otherwise focus the
145 // Send a SHIFT + TAB.
146 itemKeystroke( item
, CKEDITOR
.SHIFT
+ 9 );
164 editor
.on( 'uiSpace', function( event
) {
165 if ( event
.data
.space
!= editor
.config
.toolbarLocation
)
168 // Create toolbar only once.
169 event
.removeListener();
171 editor
.toolbox
= new toolbox();
173 var labelId
= CKEDITOR
.tools
.getNextId();
176 '<span id="', labelId
, '" class="cke_voice_label">', editor
.lang
.toolbar
.toolbars
, '</span>',
177 '<span id="' + editor
.ui
.spaceId( 'toolbox' ) + '" class="cke_toolbox" role="group" aria-labelledby="', labelId
, '" onmousedown="return false;">'
180 var expanded
= editor
.config
.toolbarStartupExpanded
!== false,
181 groupStarted
, pendingSeparator
;
183 // If the toolbar collapser will be available, we'll have
184 // an additional container for all toolbars.
185 if ( editor
.config
.toolbarCanCollapse
&& editor
.elementMode
!= CKEDITOR
.ELEMENT_MODE_INLINE
)
186 output
.push( '<span class="cke_toolbox_main"' + ( expanded
? '>' : ' style="display:none">' ) );
188 var toolbars
= editor
.toolbox
.toolbars
,
189 toolbar
= getToolbarConfig( editor
),
190 toolbarLength
= toolbar
.length
;
192 for ( var r
= 0; r
< toolbarLength
; r
++ ) {
197 lastToolbarInRow
= row
!== '/' && ( toolbar
[ r
+ 1 ] === '/' || r
== toolbarLength
- 1 ),
200 // It's better to check if the row object is really
201 // available because it's a common mistake to leave
202 // an extra comma in the toolbar definition
203 // settings, which leads on the editor not loading
204 // at all in IE. (http://dev.ckeditor.com/ticket/3983)
208 if ( groupStarted
) {
209 output
.push( '</span>' );
211 pendingSeparator
= 0;
215 output
.push( '<span class="cke_toolbar_break"></span>' );
219 items
= row
.items
|| row
;
221 // Create all items defined for this toolbar.
222 for ( var i
= 0; i
< items
.length
; i
++ ) {
223 var item
= items
[ i
],
227 if ( item
.type
== CKEDITOR
.UI_SEPARATOR
) {
228 // Do not add the separator immediately. Just save
229 // it be included if we already have something in
230 // the toolbar and if a new item is to be added (later).
231 pendingSeparator
= groupStarted
&& item
;
235 canGroup
= item
.canGroup
!== false;
237 // Initialize the toolbar first, if needed.
239 // Create the basic toolbar object.
240 toolbarId
= CKEDITOR
.tools
.getNextId();
241 toolbarObj
= { id: toolbarId
, items: [] };
242 toolbarName
= row
.name
&& ( editor
.lang
.toolbar
.toolbarGroups
[ row
.name
] || row
.name
);
244 // Output the toolbar opener.
245 output
.push( '<span id="', toolbarId
, '" class="cke_toolbar' + ( lastToolbarInRow
? ' cke_toolbar_last"' : '"' ),
246 ( toolbarName
? ' aria-labelledby="' + toolbarId
+ '_label"' : '' ), ' role="toolbar">' );
248 // If a toolbar name is available, send the voice label.
249 toolbarName
&& output
.push( '<span id="', toolbarId
, '_label" class="cke_voice_label">', toolbarName
, '</span>' );
251 output
.push( '<span class="cke_toolbar_start"></span>' );
253 // Add the toolbar to the "editor.toolbox.toolbars"
255 var index
= toolbars
.push( toolbarObj
) - 1;
257 // Create the next/previous reference.
259 toolbarObj
.previous
= toolbars
[ index
- 1 ];
260 toolbarObj
.previous
.next
= toolbarObj
;
265 if ( !groupStarted
) {
266 output
.push( '<span class="cke_toolgroup" role="presentation">' );
269 } else if ( groupStarted
) {
270 output
.push( '</span>' );
274 function addItem( item
) { // jshint ignore:line
275 var itemObj
= item
.render( editor
, output
);
276 index
= toolbarObj
.items
.push( itemObj
) - 1;
279 itemObj
.previous
= toolbarObj
.items
[ index
- 1 ];
280 itemObj
.previous
.next
= itemObj
;
283 itemObj
.toolbar
= toolbarObj
;
284 itemObj
.onkey
= itemKeystroke
;
286 // Fix for http://dev.ckeditor.com/ticket/3052:
287 // Prevent JAWS from focusing the toolbar after document load.
288 itemObj
.onfocus = function() {
289 if ( !editor
.toolbox
.focusCommandExecuted
)
294 if ( pendingSeparator
) {
295 addItem( pendingSeparator
);
296 pendingSeparator
= 0;
303 if ( groupStarted
) {
304 output
.push( '</span>' );
306 pendingSeparator
= 0;
310 output
.push( '<span class="cke_toolbar_end"></span></span>' );
313 if ( editor
.config
.toolbarCanCollapse
)
314 output
.push( '</span>' );
316 // Not toolbar collapser for inline mode.
317 if ( editor
.config
.toolbarCanCollapse
&& editor
.elementMode
!= CKEDITOR
.ELEMENT_MODE_INLINE
) {
318 var collapserFn
= CKEDITOR
.tools
.addFunction( function() {
319 editor
.execCommand( 'toolbarCollapse' );
322 editor
.on( 'destroy', function() {
323 CKEDITOR
.tools
.removeFunction( collapserFn
);
326 editor
.addCommand( 'toolbarCollapse', {
328 exec: function( editor
) {
329 var collapser
= editor
.ui
.space( 'toolbar_collapser' ),
330 toolbox
= collapser
.getPrevious(),
331 contents
= editor
.ui
.space( 'contents' ),
332 toolboxContainer
= toolbox
.getParent(),
333 contentHeight
= parseInt( contents
.$.style
.height
, 10 ),
334 previousHeight
= toolboxContainer
.$.offsetHeight
,
335 minClass
= 'cke_toolbox_collapser_min',
336 collapsed
= collapser
.hasClass( minClass
);
340 collapser
.addClass( minClass
);
341 collapser
.setAttribute( 'title', editor
.lang
.toolbar
.toolbarExpand
);
344 collapser
.removeClass( minClass
);
345 collapser
.setAttribute( 'title', editor
.lang
.toolbar
.toolbarCollapse
);
348 // Update collapser symbol.
349 collapser
.getFirst().setText( collapsed
? '\u25B2' : // BLACK UP-POINTING TRIANGLE
350 '\u25C0' ); // BLACK LEFT-POINTING TRIANGLE
352 var dy
= toolboxContainer
.$.offsetHeight
- previousHeight
;
353 contents
.setStyle( 'height', ( contentHeight
- dy
) + 'px' );
355 editor
.fire( 'resize', {
356 outerHeight: editor
.container
.$.offsetHeight
,
357 contentsHeight: contents
.$.offsetHeight
,
358 outerWidth: editor
.container
.$.offsetWidth
362 modes: { wysiwyg: 1, source: 1 }
365 editor
.setKeystroke( CKEDITOR
.ALT
+ ( CKEDITOR
.env
.ie
|| CKEDITOR
.env
.webkit
? 189 : 109 ) /*-*/, 'toolbarCollapse' );
367 output
.push( '<a title="' + ( expanded
? editor
.lang
.toolbar
.toolbarCollapse : editor
.lang
.toolbar
.toolbarExpand
) +
368 '" id="' + editor
.ui
.spaceId( 'toolbar_collapser' ) +
369 '" tabIndex="-1" class="cke_toolbox_collapser' );
372 output
.push( ' cke_toolbox_collapser_min' );
374 output
.push( '" onclick="CKEDITOR.tools.callFunction(' + collapserFn
+ ')">', '<span class="cke_arrow">▲</span>', // BLACK UP-POINTING TRIANGLE
378 output
.push( '</span>' );
379 event
.data
.html
+= output
.join( '' );
382 editor
.on( 'destroy', function() {
383 if ( this.toolbox
) {
387 toolbars
= this.toolbox
.toolbars
;
388 for ( ; index
< toolbars
.length
; index
++ ) {
389 items
= toolbars
[ index
].items
;
390 for ( i
= 0; i
< items
.length
; i
++ ) {
391 instance
= items
[ i
];
392 if ( instance
.clickFn
)
393 CKEDITOR
.tools
.removeFunction( instance
.clickFn
);
394 if ( instance
.keyDownFn
)
395 CKEDITOR
.tools
.removeFunction( instance
.keyDownFn
);
401 // Manage editor focus when navigating the toolbar.
402 editor
.on( 'uiReady', function() {
403 var toolbox
= editor
.ui
.space( 'toolbox' );
404 toolbox
&& editor
.focusManager
.add( toolbox
, 1 );
407 editor
.addCommand( 'toolbarFocus', commands
.toolbarFocus
);
408 editor
.setKeystroke( CKEDITOR
.ALT
+ 121 /*F10*/, 'toolbarFocus' );
410 editor
.ui
.add( '-', CKEDITOR
.UI_SEPARATOR
, {} );
411 editor
.ui
.addHandler( CKEDITOR
.UI_SEPARATOR
, {
414 render: function( editor
, output
) {
415 output
.push( '<span class="cke_toolbar_separator" role="separator"></span>' );
424 function getToolbarConfig( editor
) {
425 var removeButtons
= editor
.config
.removeButtons
;
427 removeButtons
= removeButtons
&& removeButtons
.split( ',' );
429 function buildToolbarConfig() {
431 // Object containing all toolbar groups used by ui items.
432 var lookup
= getItemDefinedGroups();
434 // Take the base for the new toolbar, which is basically a toolbar
435 // definition without items.
436 var toolbar
= CKEDITOR
.tools
.clone( editor
.config
.toolbarGroups
) || getPrivateToolbarGroups( editor
);
438 // Fill the toolbar groups with the available ui items.
439 for ( var i
= 0; i
< toolbar
.length
; i
++ ) {
440 var toolbarGroup
= toolbar
[ i
];
442 // Skip toolbar break.
443 if ( toolbarGroup
== '/' )
445 // Handle simply group name item.
446 else if ( typeof toolbarGroup
== 'string' )
447 toolbarGroup
= toolbar
[ i
] = { name: toolbarGroup
};
449 var items
, subGroups
= toolbarGroup
.groups
;
451 // Look for items that match sub groups.
453 for ( var j
= 0, sub
; j
< subGroups
.length
; j
++ ) {
454 sub
= subGroups
[ j
];
456 // If any ui item is registered for this subgroup.
457 items
= lookup
[ sub
];
458 items
&& fillGroup( toolbarGroup
, items
);
462 // Add the main group items as well.
463 items
= lookup
[ toolbarGroup
.name
];
464 items
&& fillGroup( toolbarGroup
, items
);
470 // Returns an object containing all toolbar groups used by ui items.
471 function getItemDefinedGroups() {
473 itemName
, item
, itemToolbar
, group
, order
;
475 for ( itemName
in editor
.ui
.items
) {
476 item
= editor
.ui
.items
[ itemName
];
477 itemToolbar
= item
.toolbar
|| 'others';
479 // Break the toolbar property into its parts: "group_name[,order]".
480 itemToolbar
= itemToolbar
.split( ',' );
481 group
= itemToolbar
[ 0 ];
482 order
= parseInt( itemToolbar
[ 1 ] || -1, 10 );
484 // Initialize the group, if necessary.
485 groups
[ group
] || ( groups
[ group
] = [] );
487 // Push the data used to build the toolbar later.
488 groups
[ group
].push( { name: itemName
, order: order
} );
492 // Put the items in the right order.
493 for ( group
in groups
) {
494 groups
[ group
] = groups
[ group
].sort( function( a
, b
) {
495 return a
.order
== b
.order
? 0 :
498 a
.order
< b
.order
? -1 :
506 function fillGroup( toolbarGroup
, uiItems
) {
507 if ( uiItems
.length
) {
508 if ( toolbarGroup
.items
)
509 toolbarGroup
.items
.push( editor
.ui
.create( '-' ) );
511 toolbarGroup
.items
= [];
514 while ( ( item
= uiItems
.shift() ) ) {
515 name
= typeof item
== 'string' ? item : item
.name
;
517 // Ignore items that are configured to be removed.
518 if ( !removeButtons
|| CKEDITOR
.tools
.indexOf( removeButtons
, name
) == -1 ) {
519 item
= editor
.ui
.create( name
);
524 if ( !editor
.addFeature( item
) )
527 toolbarGroup
.items
.push( item
);
533 function populateToolbarConfig( config
) {
537 for ( i
= 0; i
< config
.length
; ++i
) {
542 toolbar
.push( group
);
543 else if ( CKEDITOR
.tools
.isArray( group
) ) {
544 fillGroup( newGroup
, CKEDITOR
.tools
.clone( group
) );
545 toolbar
.push( newGroup
);
547 else if ( group
.items
) {
548 fillGroup( newGroup
, CKEDITOR
.tools
.clone( group
.items
) );
549 newGroup
.name
= group
.name
;
550 toolbar
.push( newGroup
);
557 var toolbar
= editor
.config
.toolbar
;
559 // If it is a string, return the relative "toolbar_name" config.
560 if ( typeof toolbar
== 'string' )
561 toolbar
= editor
.config
[ 'toolbar_' + toolbar
];
563 return ( editor
.toolbar
= toolbar
? populateToolbarConfig( toolbar
) : buildToolbarConfig() );
567 * Adds a toolbar group. See {@link CKEDITOR.config#toolbarGroups} for more details.
569 * **Note:** This method will not modify toolbar groups set explicitly by
570 * {@link CKEDITOR.config#toolbarGroups}. It will only extend the default setting.
572 * @param {String} name Toolbar group name.
573 * @param {Number/String} previous The name of the toolbar group after which this one
574 * should be added or `0` if this group should be the first one.
575 * @param {String} [subgroupOf] The name of the parent group.
576 * @member CKEDITOR.ui
578 CKEDITOR
.ui
.prototype.addToolbarGroup = function( name
, previous
, subgroupOf
) {
579 // The toolbarGroups from the privates is the one we gonna use for automatic toolbar creation.
580 var toolbarGroups
= getPrivateToolbarGroups( this.editor
),
581 atStart
= previous
=== 0,
582 newGroup
= { name: name
};
585 // Transform the subgroupOf name in the real subgroup object.
586 subgroupOf
= CKEDITOR
.tools
.search( toolbarGroups
, function( group
) {
587 return group
.name
== subgroupOf
;
591 !subgroupOf
.groups
&& ( subgroupOf
.groups
= [] ) ;
594 // Search the "previous" item and add the new one after it.
595 previous
= CKEDITOR
.tools
.indexOf( subgroupOf
.groups
, previous
);
596 if ( previous
>= 0 ) {
597 subgroupOf
.groups
.splice( previous
+ 1, 0, name
);
602 // If no previous found.
605 subgroupOf
.groups
.splice( 0, 0, name
);
607 subgroupOf
.groups
.push( name
);
610 // Ignore "previous" if subgroupOf has not been found.
616 // Transform the "previous" name into its index.
617 previous
= CKEDITOR
.tools
.indexOf( toolbarGroups
, function( group
) {
618 return group
.name
== previous
;
623 toolbarGroups
.splice( 0, 0, name
);
624 else if ( typeof previous
== 'number' )
625 toolbarGroups
.splice( previous
+ 1, 0, newGroup
);
627 toolbarGroups
.push( name
);
630 function getPrivateToolbarGroups( editor
) {
631 return editor
._
.toolbarGroups
|| ( editor
._
.toolbarGroups
= [
632 { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
633 { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
634 { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
637 { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
638 { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
652 * Separator UI element.
655 * @property {String} [='separator']
658 CKEDITOR
.UI_SEPARATOR
= 'separator';
661 * The part of the user interface where the toolbar will be rendered. For the default
662 * editor implementation, the recommended options are `'top'` and `'bottom'`.
664 * Please note that this option is only applicable to [classic](#!/guide/dev_framed)
665 * (`iframe`-based) editor. In case of [inline](#!/guide/dev_inline) editor the toolbar
666 * position is set dynamically depending on the position of the editable element on the screen.
668 * Read more in the [documentation](#!/guide/dev_toolbarlocation)
669 * and see the [SDK sample](http://sdk.ckeditor.com/samples/toolbarlocation.html).
671 * config.toolbarLocation = 'bottom';
674 * @member CKEDITOR.config
676 CKEDITOR
.config
.toolbarLocation
= 'top';
679 * The toolbox (alias toolbar) definition. It is a toolbar name or an array of
680 * toolbars (strips), each one being also an array, containing a list of UI items.
682 * If set to `null`, the toolbar will be generated automatically using all available buttons
683 * and {@link #toolbarGroups} as a toolbar groups layout.
685 * In CKEditor 4.5+ you can generate your toolbar customization code by using the [visual
686 * toolbar configurator](http://docs.ckeditor.com/#!/guide/dev_toolbar).
688 * // Defines a toolbar with only one strip containing the "Source" button, a
689 * // separator, and the "Bold" and "Italic" buttons.
691 * [ 'Source', '-', 'Bold', 'Italic' ]
694 * // Similar to the example above, defines a "Basic" toolbar with only one strip containing three buttons.
695 * // Note that this setting is composed by "toolbar_" added to the toolbar name, which in this case is called "Basic".
696 * // This second part of the setting name can be anything. You must use this name in the CKEDITOR.config.toolbar setting
697 * // in order to instruct the editor which `toolbar_(name)` setting should be used.
698 * config.toolbar_Basic = [
699 * [ 'Source', '-', 'Bold', 'Italic' ]
701 * // Load toolbar_Name where Name = Basic.
702 * config.toolbar = 'Basic';
704 * @cfg {Array/String} [toolbar=null]
705 * @member CKEDITOR.config
709 * The toolbar groups definition.
711 * If the toolbar layout is not explicitly defined by the {@link #toolbar} setting, then
712 * this setting is used to group all defined buttons (see {@link CKEDITOR.ui#addButton}).
713 * Buttons are associated with toolbar groups by the `toolbar` property in their definition objects.
715 * New groups may be dynamically added during the editor and plugin initialization by
716 * {@link CKEDITOR.ui#addToolbarGroup}. This is only possible if the default setting was used.
718 * // Default setting.
719 * config.toolbarGroups = [
720 * { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
721 * { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
722 * { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
725 * { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
726 * { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
728 * { name: 'insert' },
730 * { name: 'styles' },
731 * { name: 'colors' },
733 * { name: 'others' },
737 * @cfg {Array} [toolbarGroups=see example]
738 * @member CKEDITOR.config
742 * Whether the toolbar can be collapsed by the user. If disabled, the Collapse Toolbar
743 * button will not be displayed.
745 * config.toolbarCanCollapse = true;
747 * @cfg {Boolean} [toolbarCanCollapse=false]
748 * @member CKEDITOR.config
752 * Whether the toolbar must start expanded when the editor is loaded.
754 * Setting this option to `false` will affect the toolbar only when
755 * {@link #toolbarCanCollapse} is set to `true`:
757 * config.toolbarCanCollapse = true;
758 * config.toolbarStartupExpanded = false;
760 * @cfg {Boolean} [toolbarStartupExpanded=true]
761 * @member CKEDITOR.config
765 * When enabled, causes the *Arrow* keys navigation to cycle within the current
766 * toolbar group. Otherwise the *Arrow* keys will move through all items available in
767 * the toolbar. The *Tab* key will still be used to quickly jump among the
770 * config.toolbarGroupCycling = false;
773 * @cfg {Boolean} [toolbarGroupCycling=true]
774 * @member CKEDITOR.config
778 * List of toolbar button names that must not be rendered. This will also work
779 * for non-button toolbar items, like the Font drop-down list.
781 * config.removeButtons = 'Underline,JustifyCenter';
783 * This configuration option should not be overused. The recommended way is to use the
784 * {@link CKEDITOR.config#removePlugins} setting to remove features from the editor
785 * or even better, [create a custom editor build](http://ckeditor.com/builder) with
786 * just the features that you will use.
787 * In some cases though, a single plugin may define a set of toolbar buttons and
788 * `removeButtons` may be useful when just a few of them are to be removed.
790 * @cfg {String} [removeButtons]
791 * @member CKEDITOR.config
795 * The toolbar definition used by the editor. It is created from the
796 * {@link CKEDITOR.config#toolbar} option if it is set or automatically
797 * based on {@link CKEDITOR.config#toolbarGroups}.
800 * @property {Object} toolbar
801 * @member CKEDITOR.editor