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.
Problem/Motivation
The context menu in CKEditor looks odd, as stylesand accent are not applied:
Steps to reproduce
Add a link on text, image or drupal-media or else and then right-click it.
Proposed resolution
Add the styles via contextmenu_contentsCss to the context menu IFRAME using JS magic.
The custom accent color will not be taken into account as is seems to much code duplication and could be brought in in another issue (refactoring the custom accent color to a reuseable function).
User interface changes
The context menu will look nicer, especially in the dark-mode (dark and high-contrast and accent will be taken into account):
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff_2-7.txt | 1021 bytes | ytsurk |
#7 | 3163905-ckeditor_context_menu-7.patch | 76.71 KB | ytsurk |
| |||
#3 | Screenshot from 2020-08-07 00-27-07.png | 37.07 KB | ytsurk |
#3 | Screenshot from 2020-08-07 00-29-14.png | 16.37 KB | ytsurk |
Comments
Comment #2
ytsurkBringing in the magic :D
Comment #3
ytsurkComment #4
ytsurkComment #5
ytsurkComment #6
ytsurkComment #7
ytsurkFixed typo.
Comment #8
saschaeggiThis is great, thanks for your work. I'll review it tonight 👏
Comment #10
saschaeggiI did some minor adjustments and added it to dev.
Thanks!
Comment #12
ytsurkThank you for bringing this in, I tested on the -dev branch. Looks all good :D
Comment #13
saschaeggiIncluded in 8.x-3.0-alpha25
Comment #14
funana CreditAttribution: funana as a volunteer commented@saschaeggi
We are on gin 8.x-3.0-alpha37 and the issue exists again.
Patch in #7 can't be applied.
Comment #15
saschaeggi@funana -> #3245058: [CKEditor] Darkmode gets removed after checking the source