In the past I used to add a custom ckeditor.config.js file to the theme to have CKEditor output the desired buttons. In version 6.x-1.8, the need for this was almost rendered useless with the addition of adjusting the buttons from within the settings. This feature was long in waiting but there was nothing for configuring the "Simplified Toolbar". So I attempted to customize it from the theme again. But this time it had no affect.
After investigating the module, I found on line 618 of ckeditor.module that the simplified toolbar is hardcoded like so:
Lines 610 -619
$toolbar = $conf['toolbar'];
//$height += 100; // for larger toolbars
$force_simple_toolbar = ckeditor_is_enabled('1', empty($conf['simple_incl_regex']) ? '' : $conf['simple_incl_regex'], $element['#id'], $_GET['q']);
if (!$force_simple_toolbar) {
$force_simple_toolbar = ckeditor_is_enabled('1', empty($global_conf['simple_incl_regex']) ? '' : $global_conf['simple_incl_regex'], $element['#id'], $_GET['q']);
}
if ($force_simple_toolbar) {
$toolbar = "[ [ 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image' ] ]";
}
As you can see, having the simplified toolbar hardcoded within the module prevents any overrides from a config file.
For the the being, I have to HACK that value to fit my needs. I'd rather not, but attempts to patch it have gone no where. So I'm reporting it in hopes it can be fixed in a later release.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 0002-1436432-by-dczepierga-Simplified-toolbar-configurati.patch | 12.1 KB | dczepierga |
| #6 | 0001-1436432-by-dczepierga-Simplified-toolbar-configurati.patch | 13.39 KB | dczepierga |
Comments
Comment #1
pawel.traczynski commentedYes, i agree. The drag and drop interface for toolbars in CKEditor module was bad idea.
I had a lot of ready to use ckeditor config js files. Now they are useless.
I hate hacking modules but i was left with no other option here.
Comment #2
mkesicki commented@pawel.traczynski In latest DEV version there is an option in Global profile configuration to disable Drag & Drop feature. After turn it off you can change toolbars in normal text area in profile configuration.
Comment #3
jcisio commented@michal_cksource Problem is that we can no longer modify the Simplified toolbar (I use simplified toolbar for e.g. comment and ful toolbar for node body).
Comment #4
remaye commented+1
Comment #5
dczepierga commented@pawel.traczynski, drag and drop interface is good for new users who don't know anything about webdeveloping and for them write toolbar in config it's really hard, so this feature was really needed and we must do this - i know does u have ready configs for toolbars, but u're webdeveloper and port this to new version take u only few minutes. So pls look for this from other side (user who don't know anything about this)...
@jcisio, i will add Simplified toolbar configuration from Global Profile - i start to work on it now, so i've attach patch here asap.
Greetings
Comment #6
dczepierga commentedI've attach patch which add Simplified toolbar configuration in Global profile. You can disable drag&drop feature in Global profile -> Advanced settings.
Patch created from last DEV version of CKEditor module.
Pls review this path and write does it work or not.
Greetings
Comment #7
dczepierga commentedI've attach next patch with a little fix.
Again patch is created from last DEV version of CKEditor module.
Greetings
Comment #8
mkesicki commentedCommitted to GIT (diff)
Comment #9
jcisio commentedReopen because it is half fixed. Modify buttons in simplified toolbar works great, but there is no plugin. For example, I can't place the IMCE Upload button in the simplified toolbar.
It is a regression bug because in earlier versions, I can modify ckeditor.config.js (in my theme folder) to add plugins and configure the buttons for both full and simplified toolbars.