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 tried #1890502-84: WYSIWYG: Add CKEditor module to core on Firefox and Chrome. In both cases, when I add the U (underline) button to the toolbar for the Full HTML format, then when I go to edit some text in that format, the toolbar does not include that button.
I breakpointed Drupal.editors.ckeditor.attach() and found that the Underline button item does exist as expected in format.editorSettings passed to CKEDITOR.replace(), so I don't know if it's a bug with CKEditor itself, or if there's some other incompatibility in what's passed.
Comment | File | Size | Author |
---|---|---|---|
#4 | ckeditor_underline_doesnt_work-1905022-4.patch | 1.67 KB | Wim Leers |
#3 | ckeditor_underline_doesnt_work-1905022-3-do-not-test.patch | 940 bytes | Wim Leers |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedTagging
Comment #2
effulgentsia CreditAttribution: effulgentsia commentedComment #3
Wim LeersThis is because CKEditor loads its default config.js file with the default config, which contains:
In previous iterations of the patch at #1890502: WYSIWYG: Add CKEditor module to core, we explicitly unlisted these buttons to be removed.
I consulted with the wwalc of the CKEditor guys, and attached is a patch that implements the proper way to ignore the default config file, and only listen to our instructions instead.
Comment #4
Wim LeersNow with updated tests.
Comment #5
effulgentsia CreditAttribution: effulgentsia commentedThanks. Since #1890502: WYSIWYG: Add CKEditor module to core needed a reroll anyway, I merged this into it.
Comment #6
Wim LeersExcellent — thanks!
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedCustom buttons still don't show up. I added the buttons for left, right, centered or justified text alignment but the buttons don't show up. I did try to clear the cache but without a change.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedHm... it looks like for some buttons the allowed HTML tags are added automatically and for some they are not. Not sure which tags I should add for the mentioned buttons but after disabling the limit the buttons are showing up.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedFor anyone else having issues with the mentioned buttons make sure that you have
<p class>
as an allowed tag and attribute.Comment #10
mgifford@furious_snail This issue has been closed.
It would be best to start a new issue and link both to this one and #1890502: WYSIWYG: Add CKEditor module to core
Thanks!