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.
I have error Uncaught TypeError: Object #
has no method 'addButton'Comment | File | Size | Author |
---|---|---|---|
#1 | ckeditor-7.x-1.12-fix-js-error-addbutton-1945594-1.patch | 3.09 KB | agalitsyn |
Comments
Comment #1
agalitsyn CreditAttribution: agalitsyn commentedHere is a patch
Comment #2
wwalc CreditAttribution: wwalc commentedThe problem is slightly different. The "source" version of CKEditor contains its own version of config.js, with the list of plugins to be loaded (along with the button plugin), which is critical in order to have all important plugins loaded.
The attached patch removes the JS error, but CKEditor will not load anyway.
The real fix if one wants to use the source version is to copy the relevant lines from config.js provided with CKEditor, e.g.:
and paste them into ckeditor.config.js in CKEditor module. Alternatively, set config.plugins in advanced options of CKEditor profile.
Comment #3
heddnFor posterities sake, you also have to add the version so libraries will load everything. Grab the version string i.e. version:"4.4.2" and copy into the first few lines of the uncompressed js. Putting it into the comments out @license section seems to be fine.