Problem/Motivation
When another CKEditor plugin provides a widget with certain attributes, the drupal-entity handling incorrectly claims it as its own widget during upcast. This results in the other widget's handling no longer working, e.g. doubleclick or right click behaviors.
Proposed resolution
Prevent upcast if the element is not actually a drupal-entity tag.
Remaining tasks
Write patch & review
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2956745-5.patch | 844 bytes | wim leers |
| #2 | entity_embed-js_plugin_upcast-2956745-2.patch | 989 bytes | ckaotik |
Comments
Comment #2
ckaotikI've attached a minimal patch, please review.
We might want to include a test for this, dunno.
Comment #4
dave reidI would need to check if this would break the Lightning distro's CKEditor integration.
Comment #5
wim leersI cannot reproduce this with just core +
entity_embed, but I can see how another CKEditor widget with extremely similar markup (i.e. the samedata-attributes) could run into this.core/modules/ckeditor/js/plugins/drupalimage/plugin.jsin itsupcastmethod does something similar:So I'm +1 to this. But I'd keep this much simpler.
Comment #6
wim leersNote: if #2544020: CKEditor plugin not written with CKEditor >=4.4 in mind; rewrite it based on core's `drupalimage` plugin happens before this, this will become obsolete.
Comment #7
wim leersActually, I think it doesn't make sense to keep this open, we should do #2544020: CKEditor plugin not written with CKEditor >=4.4 in mind; rewrite it based on core's `drupalimage` plugin anyway, so let's just make a note there to absolutely certainly do this as part of that.