I have a config.toolbarGroups setting in config.js but I don’t know what name to use for the groups to add font family/font size controls. (It seems the documentation is lacking in this regard). I’ve found some suggestion that I should use CKBuilder to create a package that already includes it, but I can’t redeploy the entire ckeditor just to add a couple of buttons.
Edit: My CKEditor is version 4
Any advise?
Thanks!
This can be used to add font family and font size in the CkEditor.
This is to be done in config.js.
Also see docs
There are two (mutually exclusive) ways to configure the toolbar. Check out the following:
http://ckeditor.com/latest/samples/plugins/toolbar/toolbar.html
I tried to use config.toolbarGroups first, but ended up using config.toolbar instead. Here’s what I ended up using:
Note that I am using a save plugin that was generously contributed by kasper Taeymans, which can be found at the following location:
https://stackoverflow.com/questions/18956257/how-to-add-an-ajax-save-button-with-loading-gif-to-ckeditor-4-2-1-sample-plugi
I also found the following document to be really useful, even though it related to version 3:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar
I used the information in this article to produce my configuration (I’m using version 4.2.1), specifically the names of the items (e.g. Cut, Copy, Paste), as this was the missing link in my case.
You have to add the plugin…
FontSize
to the toolbar, too - doesn’t seem to work withFont
only.