Problem/Motivation
We are using the style plugin to allow content editors to easily apply some classes for styling reasons. For example some buttons styles to an a tag:
a.btn.btn-primary|Primary Button
a.btn.btn-outline-primary|Primary Outline Button
a.btn.btn-secondary|Secondary Button
With CKE 4 it was possible to simply click on some part of the a tag and then select the style. Now with CKE5 this does not work anymore properly. Only if the whole link text is selected I can properly apply a style and the classes are added.
Steps to reproduce
- Use some stlyes in the editor, e.g:
a.btn.btn-primary|Primary Button
a.btn.btn-outline-primary|Primary Outline Button
a.btn.btn-secondary|Secondary Button
- Add some text via the edior
- add a link, have the curser on some parts of it (no selection)
- try to apply the "Primary Outline Button" style
- try to aplly a different style
- try to remove the style again
Proposed resolution
It should work as easily as with CKE 4
Remaining tasks
User interface changes
API changes
Data model changes
none
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | cke-style.mp4 | 10.38 MB | schoenef |
| #3 | Screenshot 2023-03-21 at 17.56.25.png | 90.85 KB | schoenef |
Comments
Comment #2
schoenef commentedComment #3
schoenef commentedI added a screenshot to further illustrate the issue:
Comment #4
wim leersCould you record a screencast demonstrating the problem? That'd really help! 🙏
Comment #5
schoenef commentedHi @wim-leer,
I added a screencast illustrating the problem - it's mainly a usability issue in my eyes.
The style config used in the screencast is the same as above:
Thx a lot!
Andreas
Comment #6
wim leersComment #7
wim leersAFAICT this was a duplicate of #3376167: [upstream] [GHS] Add style to anchor leads to unusable behavior, which was fixed by #3406732: Update CKEditor 5 to 40.2.0. Can you still reproduce this on Drupal 10.2? 🙏
Comment #8
wim leers