bunnyali2013 Posted November 4, 2012 Share Posted November 4, 2012 (edited) 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. Edited November 4, 2012 by bunnyali2013 Quote Link to comment https://forums.phpfreaks.com/topic/270268-insertimage-in-documentexeccommand-not-appearing/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.