Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
ckeditor.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Feb 2016 at 17:26 UTC
Updated:
7 Mar 2016 at 03:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersQuoting
plugins/widget/plugin.jsin CKEditor:It is those attributes that are being picked up by
drupallink's link parsing. This will be true for any widget that can be wrapped in a link.The reason that CKEditor's
image2+linkdon't suffer from this, is becauselinkis hardcoded to a limited set of attributes that it supports (i.e. also notclass). Compare to Drupal 8'sdrupallinkplugin, which supports any attribute (i.e. alsoclass).Needs feedback from the CKEditor team on how to best solve this, because AFAICT the Widget API does not have an API to determine which attributes and attribute values should be ignored. I suspect the answer will be: .
Comment #3
mlewand commentedWe're also preventing this class to leak into our link's advanced tab (it can be enabled using config). And just as you've assumed we're simply dropping cke_* classes and it's working just fine, see https://github.com/ckeditor/ckeditor-dev/blob/cce5ef6e8583e25392e3910b80...
Comment #4
wim leersAlright, thanks!
Working on a patch.
Comment #5
wim leersComment #6
duaelfrAs told on IRC I suggest to wipe all
data-cke-*attributes as advices by the CKEditor team.I also suggest to use
indexOfinstead ofsubstringfor clarity.I did the manual testing with editor_advanced_link and both patches fix the issue.
Comment #7
thpoul commentedI don't seem able to replicate the issue on fresh 8.0.x with editor_advanced_link 8.x.1.0, so I haven't been able to manual test #5
Tried with Full HTML editor. Added a link and played around with it. Saved, edited and added class then saved, edited again removed class and added title, etc.
@DuaelFr could you please provide the steps to reproduce?
Comment #8
duaelfrSure!
The thing happens when you edit a link that was added on an image.
Comment #9
duaelfrAdded steps to reproduce
Comment #10
duaelfrComment #11
wim leers#8 I can't reproduce it when editing a linked image.
harclass):Comment #12
wim leersOh, it's in the dialog itself. That I also cannot reproduce… weird!
Comment #13
duaelfrBeware of Chrome's cache ;)
Comment #14
thpoul commentedThank you @DuaelFr
I can confirm that manual testing #6 works.
Attaching screenshots for the record.
Comment #15
wim leersNW for a nit:
This comment is now incorrect. It's not "CKEditor Widget internals" but just "CKEditor internals" now.
Comment #16
thpoul commentedHere you go.
Comment #17
wim leersComment #18
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!