Log in or register to post comments
Last post
nfplee's picture
Joined: 23/04/2013
Posts: 6
Toolbar Groups Help

I've read the documentation explaining the api changes with version 4. The specific change which confuses me is the new toolbarGroups. For example say I had the following originally:

config.toolbar = 'Basic';
    
config.toolbar_Basic = [
	['Bold', 'Italic', 'Underline', 'Strike'],
	['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'],
	['Link', 'Unlink']
];

config.toolbar_Standard = [
	['Bold', 'Italic', 'Underline', 'Strike'],
	['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'],
	['Link', 'Unlink'],
	['Smiley']
];

Then all I had to say was the following to override the default toolbar:

CKEDITOR.replace('editor', {
    toolbar: 'Standard'
});

How could this be modified to deal with the new API changes? Thanks

mountaineer's picture
Joined: 30/04/2013
Posts: 5
Tollbar Groups and Button List

This question was posted previously but not answered. Isn't there a simple list of Toolbar Groups and just what buttons appear in them so I know what to add and remove for my custom toolbar?

nfplee's picture
Joined: 23/04/2013
Posts: 6
After further research it

After further research it looks like this feature has been removed. The only way I can see to do it is to use the removeButtons config for each instance. Please correct me if i'm wrong.

j.swiderski's picture
Joined: 10/05/2011
Posts: 175
about groups

Hi,

1. Toolbargroups don't have standard, basic etc. definitions but you still can use 'item by item' configuration.

2. Please see this link http://docs.ckeditor.com/#!/guide/dev_toolbar, define toolbars you want to use and then you can use them. For example:
 

var editor = CKEDITOR.replace( 'editor1', {
    
    toolbar_Basic : [{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }],
    toolbar_Full : [{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] }],
    toolbar : 'Full'
   } );

 

sebstefanov's picture
Joined: 03/02/2012
Posts: 1458
Complete list of toolbar

Complete list of toolbar items is here. More on toolbar configuration can also be found here

Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, Google+, LinkedIn

If you think you found a bug in CKEditorread this!

mountaineer's picture
Joined: 30/04/2013
Posts: 5
groups 'align' not working

Thank you for the list of buttons. I have figured out what I need for the toolbarGroups and the removeButtons settings but I have noticed that the 'align' group does not appear in the toolbar in Firefox or IE. I am using the latest build 4.1.1, could this be a bug or has the name of the group been changed? I know I can go to adding individual items but would rather stick with the groups for simplicity.

config.toolbarGroups = [
		{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'paragraph',   groups: [ 'list', 'align' ] },
		{ name: 'insert' },
		'/',
		{ name: 'styles' },
		{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] }
	];

	config.removeButtons = 'Underline,Strike,Image,Table,Format';

 

mountaineer's picture
Joined: 30/04/2013
Posts: 5
cke_colorbox

One last little thing. I have redone the styles.js file so it only has 3 styles. However there is a span.cke_colorbox entry showing at the bottom of the list, I don't know where this is coming from. It seems to have no style tied to it so again I am wondering if this is a bug.

Larry