- $('<li></li>').appendTo('#insertImg').html('<button onclick="document.execCommand('InsertImage',false,'http://stiern.com/site/wp-content/everything/weddinginv.png');")>Insert IMG</button>').addClass('success');
But I can't seem to make it work. What could the issue be here? It insert the button, but the onclick action doesn't work. I've tried like this as well:
- $('<li></li>').appendTo('#insertImg').html('<button onclick="document.execCommand("InsertImage",false,"http://stiern.com/site/wp-content/everything/weddinginv.png");")>Insert IMG</button>').addClass('success');
I don't know if it has anything to do with the apostrophes or the quotation marks?