Jump to content

Insertimage In Document.execcommand Not Appearing


bunnyali2013

Recommended Posts

So I made a function to insert image through document.execcommand in Javascript..

function images() {
var img = prompt ("Enter the image link", "");
if (img != null) {
lol.document.execCommand("insertImage", false, img);
}
};

The image is not appearing, even on live server.. It shows the broken image icon. This code is supported by all browsers. The rest of my execcommand functions are working well.. I checked the code in Inspect element in Firefox and Chrome, they are displaying the image with the tags and link well, but still show the broken image icon.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.