bunnyali2013 Posted November 4, 2012 Share Posted November 4, 2012 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. Link to comment https://forums.phpfreaks.com/topic/270268-insertimage-in-documentexeccommand-not-appearing/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.