Problem/Motivation
When the CKEditor module landed, CKEditor did not yet support HiDPI ("Retina") screens. Then, they added support for that. But our custom Image and Link plugins were never updated to support that too.
Worst of all, this is also setting a bad example for D8 contrib, which followed the lead of those two modules, and then also doesn't support HiDPI. See #2625866: CKEditor ships with HiDPI icons for its buttons, Embed doesn't support that?.
Proposed resolution
Just use the APIs that CKEditor provided. And import the images from CKEditor's official plugins. Then the end result looks like this:
- Before

- After
-

Remaining tasks
Review.
User interface changes
HiDPI icons for the Image and Link/Unlink buttons.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff.txt | 670 bytes | star-szr |
| #8 | ckeditor_drupallink_drupalimage_hidpi-2626570-8.patch | 10.75 KB | wim leers |
Comments
Comment #2
wim leersComment #3
wim leersOf course, this is not only about those specific examples, but also about ensuring that the API support is there, as well as documentation.
Comment #4
wim leersThis is so ridiculously simple.
Comment #5
wim leersAnd now with the updated PHP plugin definitions.
Comment #6
thpoul commentedPatch looks great. Manual testing confirms the premise of the proposed resolution and the screenshots of #4.
Comment #8
wim leersUpdated test expectation.
Comment #9
duaelfrNothing to add. Well done :)
Comment #12
star-szreslint didn't like these trailing commas, fixed on commit and pushed to 8.2.x and 8.1.x. Thanks!
Comment #13
star-szrI meant to include the interdiff of what I changed, here it is.
Comment #14
wim leersThanks Cottser!