Note: CKEditor Version at the time of this writing: 4.5.6
Problem/Motivation
Currently, some custom plugins downloaded from http://ckeditor.com/ won't have their buttons available on the Drag & Drop toolbar wizard, even though the plugin is available in the "Plugins" list on the CKEditor profile edit page. If you disable the toolbar wizard, and manually enter the button name in the text-based configuration field, the button will appear when you actually go to use the editor on a node form (for example). You can test this out with the Tweetable Text plugin:
- Place it in the plugins directory (configured on the Global Settings page: admin/config/content/ckeditor/editg)
- Disable the Toolbar Drag & Drop Feature on the Global Settings page
- Edit the profile you wish to use the plugin on and enable the plugin ("Plugin file: tweetabletext")
- Manually add the button name (
TweetableText
) to the toolbar configuration textarea. - Then add/edit a node that has the editor on it and you should see the button.
I believe the problem is that CKEditor has changed the method for defining plugin button icons, but the CKEditor module hasn't updated the icon discovery code for the administration pages. The current method for adding button icons is by putting them in an "icons" folder with the filename being the lowercased button name (ref http://docs.ckeditor.com/#!/guide/plugin_sdk_sample).
Proposed resolution
Check for icons in the button definition first, otherwise assume there is an icon in the icons folder. If there is no icon in the icons folder (i.e. if the icon method changes again), the button will at least still show up on the administration page as a broken image with the ALT text so the user can still position it using the drag & drop interface.
Remaining tasks
Review Attached Patch, commit. :)
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
ckeditor-toolbar_wizard_buttons-0.patch | 2.41 KB | drclaw | |
|
Comments
Comment #3
drclaw CreditAttribution: drclaw commentedJust noticed this related, maybe even duplicate issue #2228037: Additional plugins are working but buttons are not display in backend
Comment #4
drclaw CreditAttribution: drclaw commentedPatch failed because of a CI error... this module doesn't have any tests anyway so... needs review again? :)
Comment #5
AaronMcHalePatch works great, thanks :D
Comment #6
jcisio CreditAttribution: jcisio at Axess Open Web Services commentedSo this is a long time bug, not new one and unrelated to the recent plugin system change. This patch makes an assumption on the plugin filename and extension, however all plugins that I check follow this pattern, so it's ok for this fallback.
Committed and pushed. Thanks.
Comment #8
jcisio CreditAttribution: jcisio at Axess Open Web Services commentedComment #10
candelas CreditAttribution: candelas as a volunteer commentedThanks @drclaw I was getting nuts with icons not showing :)