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.
When adding a ckeditor plugin using the hook_ckeditor_plugin hook the button for that plugin is not appearing on the toolbar. Looking at the function ckeditor_load_plugins in ckeditor.lib.inc it looks like some regex tries to extract the button information from the javascript js file. This appears to work successfully but then the button is not then added to the plugins array.
Comment | File | Size | Author |
---|---|---|---|
#3 | showhide.tar_.gz | 2.29 KB | johnennew |
#1 | ckeditor_plugin_button_fix-1350474-0.patch | 1.14 KB | johnennew |
Comments
Comment #1
johnennew CreditAttribution: johnennew commentedHere is a patch which works for me.
Comment #2
mkesicki CreditAttribution: mkesicki commentedCan you check your plugin with latest DEV version ? I changed mentioned regex in
ckeditor_load_plugins
function. Can you upload plugin which doesn't work for you ?Comment #3
johnennew CreditAttribution: johnennew commentedHi michal_cksource ,
I tried the latest dev version and found the same problem which is fixed by the patch I submitted. Its not the regex as that finds the button correctly, but after the regex has found the button the code does not add the button to the $plugins variable.
Attached is my ckeditor plugin module.
Kind regards,
John
Comment #4
mkesicki CreditAttribution: mkesicki commentedthank you @johnennew we will check this. Please be patient.
Comment #5
dczepierga CreditAttribution: dczepierga commented@johnennew, i fix it and commit to GIT. Thx for report it.
Pls update to last DEV version.
Greetings
Comment #6
dczepierga CreditAttribution: dczepierga commentedComment #7.0
(not verified) CreditAttribution: commentedTypo correction