Closed (fixed)
Project:
Linkit
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2016 at 00:06 UTC
Updated:
17 Dec 2019 at 18:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
amykhailova commentedI have tested it on the 8.x-4.1 and 8.x-4.x-dev versions of the module, both had the same problem for me.
Comment #3
star-szrConfirmed, here's a patch which just pulls in code from the core Link plugin to handle images (makes the linkit CKEditor plugin more similar to the core link plugin).
This seems to work well and doesn't break normal linking as far as I can tell but needs more testing to confirm.
Note that you may need to clear browser cache to test this.
Comment #4
wim leersWow. All of this seemingly is only necessary because the LinkIt module reimplements all of the link dialog, instead of extending the existing one in Drupal 8.
Why doesn't this just alter EditorLinkDialog's form?
Comment #5
star-szrYeah I was kinda thinking to myself, why is this all repeated. Great point :)
Comment #6
anonExtend the default would be perfect, But I cant figure out how to extend the allowedContent part of the default. Any ideas?
Comment #7
wim leersLook at how the
drupalimagecaptionplugin extends thedrupalimageplugin. It does exactly that IIRC :)Comment #8
anondrupalimageanddrupalimagecaptionare using the widgetDefinition event.The
drupallinkplugin doesn't use that and I can't find any other way to alter the allowedContent.Any thoughts?
Comment #9
wim leersI wrote up my feedback in #2692831: Linkit 8.x-4.x flaws from the POV of the Text Editor/CKEditor APIs in Drupal 8 core.
For extending
allowedContentfor thedrupallinkCKEditor plugin (though I strongly doubt that is necessary here), you'd want to useafterInit.Comment #10
anonFixed with #2692831.
Comment #12
omnimon commentedStill happening im afraid, with the latest release or dev release.
Comment #13
anon@omnimon: Na, I can not reproduce this. And it is very strange that this is still an issue for you as Linkit is now using the exact same js code as drupal core. Make sure to clear your cache.
Comment #14
thejimbirch commentedI just want to comment that upgrading to 8.x-5.x-dev fixed this for me.
Comment #15
heyehren commentedFor me the links are still added in front of the image, even with running the latest dev version 8.x-5.0-beta5+4-dev on Drupal 8.3.7 and clearing the cache.
UPDATE: Ok, it is working with img tags for me as well now. What still doesn't work is to link images added by the entity embed module. But this is an issue related to their module. I have fixed it for now by using https://www.drupal.org/project/entity_embed_link
Comment #16
tritof commentedHi, I still have the problem Drupal 8.5.3 and linkit 8.4.3.
Comment #17
anonym-developer commentedConfirm #16, still the same issue with Drupal 8.5.6 and Linkit 8.4.3.
Comment #18
jasonflaherty commentedConfirming the same issue as noted above. Internal, Files and External links all insert before image.
Comment #19
gobnat commentedThis is still happening for me.
Drupal version: 8.6.4
Any news if this is getting fixed?
Comment #20
alisonStill happening for me, too, core 8.7.6 + LinkIt 8.x-5.0-beta9 :(
Comment #21
embeau commentedI am still encountering this issue as well. Linkit version 8.x-4.3, Drupal version 8.6.7.
Comment #22
hkirsman commentedI'm getting with this patch:
Adding the patch from here https://www.drupal.org/project/drupal/issues/2855521 makes the js error go away but
<a href="undefined">I've now changed to 5.0-beta10 and it works (without the patches).
Comment #23
yojohnyo commentedI am encountering this problem on 8.x-5.0-beta10 Drupal version 8.8.4