View Full Version : Insertimage In Document.execcommand Not Appearing

11-04-2012, 07:28 AM
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.

11-04-2012, 07:36 PM
execCommand is only supported by Internet Explorer - it isn't intended for use on the internet.

11-04-2012, 07:39 PM
nope, the issue has been solved.. its because the link did not put the image format... i dont know know where to mark the thread as solved here...on coding forum, can you guide me?