Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.11.1 insertImage doesn't insert link

See original GitHub issue

Somewhere between 2.10 and 2.11.1 a change on line 1425 breaks link insertion for insertImage. Either the modal box disappears and nothing is added in the editor or a new insertImage modal box appears on top of the previous one.

 // Build out of ModalBox, it's the mask for animations
var $modal = $('<div/>', {
                class: prefix + 'modal ' + prefix + 'fixed-top'
                top: t.$box.offset().top + t.$btnPane.height(),
                zIndex: 99999

Line 1425 in 2.11.1 is ‘}).appendTo($(document.body));’ Line 1425 in 2.10 is ‘}).appendTo(t.$box);’

Changing ‘only’ that single line in 2.11.1 code makes the insertImage work again.

Browser version: Safari 12, Firefox 62.0.3 OS: Mac

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

causzticcommented, Oct 7, 2018


I managed to fix this temporarily without changing source code by adding this:

success: function(data, trumbowyg, _$modal, values) {
  trumbowyg.doc.execCommand("insertHTML", false, "<img src='" + data.url + "' alt='" +  values.alt + "'>")
aliqasemzadehcommented, Oct 19, 2018

Hello, I have this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AdminApp: Can't add link to image item in content block
Article describing an issue inserting dynamic link to an image item when using new Kendo editor.
Read more >
Insert Image by URL Doesn't Work in Google Apps Script
The URLs logged by Google Form by upload question type can't be used with methods like insertImage(URL) because those URLs aren't supported.
Read more >
how to add image to post? - Site support forum - TI E2E
Selecting Insert tab, then image, pop up box asks for file or url. No file browser is shown to select file from local...
Read more >
Insert Image not working in Google Forms Quiz
All of a sudden inserting an image for a google forms quiz is not working. The window pops up but is a blank...
Read more >
Make the Image in Your Gmail Signature a Working Hyperlink
Compose the text portion of your signature, then click the Insert Image button to add the logo. Gmail doesn't support uploading images for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found