Hello,
I've been using this module as part of Panopoly (I just upgraded to Panopoly 1.1), and I'm seeing some unexpected behavior. Basically, if I try to use LinkIt to add a link to an inline image in a WYSIWYG textarea, both the image and adjacent text ends up being part of the link. I've done some research and I'm pretty sure the issue is due to LinkIt. Here's how to reproduce using Panopoly 1.1 (this is the easiest/fastest way to get everything configured to reproduce this issue):
- Start with a fresh copy of Panopoly 1.1.
- Click to create a new node of type "Content page".
- Add some dummy text in the body, and use the "Add media" button to add an inline image (I used "Display as" = "Quarter size"). See http://note.io/OkqlaI
- Next, select the image and click the "LinkIt" button and add any valid target path.
- After clicking the "Insert link" button, note how _everything_ is now a link. See http://note.io/1goQSLu
This appears to be an issue with the fact that the Media module doesn't output <img> tags, rather it output Media tags (for example: [[{"fid":"8","view_mode":"teaser","fields":{"format":"teaser","field_file_image_alt_text[und][0][value]":"Superman","field_file_image_title_text[und][0][value]":"Superman"},"type":"media","attributes":{"alt":"Superman","title":"Superman","height":"293","width":"240","class":"panopoly-image-quarter media-element file-teaser"}}]]). It appears that LinkIt doesn't properly handle figuring out exactly what is supposed to be linked when a Media tag is selected.
Let me know if I'm on the right track.
Thanks,
-mike
Comment | File | Size | Author |
---|
Comments
Comment #1
anonWhen I test this a clean drupal install with the latest media and file_entity, this works.
The media module is converting the media tag in the editor (when in editor mode) to a img tag.
Comment #2
anonI can also confirm this bug when using Panopoly.
the bug is in Linkit 7.x-2.x
I made a quick update to Linkit 7.x-3.x and that works. Tho is pretty messy to update linkit version in panopoly as they have bundled linkit with there features.
and since this error is fixed on 7.x-3.x, I will not fix this in 2.x id not someone creats a really good patch for it.
Comment #3
jonathanwestman CreditAttribution: jonathanwestman commentedIs the update for this in 7.x.3.x-dev? I pulled the latest dev version and this seems to still be an issue. My Linkit tag gets removed when it is wrapping a Media tag.
Any help would be appreciated.
Comment #4
ultimikeI think this is still an issue in 7.x-3.x. Here's how to reproduce it in Panopoly 7.x-1.14/LinkIt 7.x-3.2:
-mike
Comment #5
anonComment #6
neottone CreditAttribution: neottone commentedJust to clarify, Linkit works fine on Firefox (v34), but not in IE (v11) or Chrome (v39).
Comment #7
neottone CreditAttribution: neottone commentedComment #8
aaron.hirtenstein CreditAttribution: aaron.hirtenstein commentedAny movement on this? I have run into the same problem, not on panopoly. Using the latest version of Drupal, Media 7.x-2.0-alpha4+11-dev and Linkit 7.x-3.x.
Comment #9
anonTry updating to the latest version of the ckeditor lib.
Would be nice if you can post some markup I can use to test this.
Comment #10
anonPlease, reopen if this is this a problem.