CKEditor toolbar separator issues

While using CKEditor within a GetSimple 3.1.2 installation, the toolbar separators I inserted just were not working. According to CKEditor documentation, separators are easily inserted using ‘-‘ within your toolbar parameters (contained in gsconfig.php). So, from reading the wiki and forums it seems as if the syntax would be:

define('GSEDITORTOOL', "['Bold', 'Italic', 'Underline', 'FontSize','TextColor', '-', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', '-', 'NumberedList', 'BulletedList', '-', 'Table', '-', 'Link', 'Unlink', 'Image', 'RemoveFormat', 'Source']");

Unfortunately, in Firefox 12 and IE 9, my separators were not showing up and my toolbar was just one big jumble of buttons. The syntax to correct this is as follows:

define('GSEDITORTOOL', "['Bold', 'Italic', 'Underline', 'FontSize','TextColor'], '-', ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], '-', ['NumberedList', 'BulletedList'], '-', ['Table'], '-', ['Link', 'Unlink', 'Image', 'RemoveFormat', 'Source']");

Notice that in the above example of the correct syntax, each and every set of toolbar options is contained within [], with the ‘-‘ separator outside the []. Contrast this with our earlier example from the CKEditor docs, which just lumps the options and separators together within one set of []. You can also throw in a ], '-', [ to get a line wrap.

After searching the CKEditor and GetSimple forums/wikis plus the web at large and finding nothing on this subject, I’ve posted here in the hopes it will help someone else.

Leave a Reply

Your email address will not be published.