Closed (outdated)
Project:
Insert
Version:
7.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2013 at 15:06 UTC
Updated:
21 Jul 2018 at 08:28 UTC
Jump to comment: Most recent
I was trying to get Insert module to work with File Entity Preview. The insert button appears, but clicking "Insert" did not insert the image into the content.
I was able to get it to work by adjusting line 40 in insert.js.
old code - //var wrapper = $(this).parents(settings.wrapper).filter(':first').get(0);
new code - var wrapper = $(this).parents(settings.wrapper).filter(':eq(1)').get(0);I know this is not ideal change, but maybe it will help others in similar situation. If there's a way to adjust the code so it will work with File Entity Preview, I'd appreciate it included in the next update of this module.
Comments
Comment #1
b777 commentedThis change will make Insert only insert the first image in the list, so breaks functionality if more than 1 file is in the list... unintended bug created. So I don't recommend this approach.
Comment #2
snater commentedFile Entity Preview usage peaked at around 500 installations and does not seem to be maintained any more, which does not justify a change specific to that module in the Insert module code. Functionality interfacing these modules should be put into a separate module.