Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be nice if we can have alter() hooks to alter the settings of ckeditor. E.g. to change the ckeditor.config.js path to handle custom changes better (don't hack/change the contrib code).
The main problem for this feature is related to this issue #1056106: Updating ckeditor overwrites changed ckeditor.config.js
With a general settings alter hook, other modules have much more possibilities to interace with ckeditor and/or ckeditor module without to "hack" the code.
Comment | File | Size | Author |
---|---|---|---|
#8 | ckeditor-alter-1968600-8.patch | 493 bytes | douggreen |
#1 | 1968600-implemented_settings_alter_hook-1.patch | 1.11 KB | cbeier |
Comments
Comment #1
cbeier CreditAttribution: cbeier commentedI implemented the alter() hook and added documentation for the hook in ckeditor.api.php.
Comment #2
wwalc CreditAttribution: wwalc commentedComment #3
wwalc CreditAttribution: wwalc commentedIf anyone tried it, please add here a comment.
Comment #4
BarisW CreditAttribution: BarisW commentedPatch works as expected, thanks!
I've used it to override the toolbar without having to override an existing feature (from Drupal Commons).
Comment #5
jcisio CreditAttribution: jcisio commentedCommitted #1. Thanks.
Comment #7
pfrenssenCreated a followup issue to allow modules to alter the default settings in addition to the actual settings: #2013657: Allow other modules to alter the default settings.
Comment #8
douggreen CreditAttribution: douggreen commentedIt would be nice to have the profile name with the settings, but I'm not sure if we should alter this.