I'm using the bootbox.js prompt as the following :
document.getElementById('picture').addEventListener('click', function(){
bootbox.prompt('URL de l\'image: ', function(result){
document.execCommand('insertImage', false, result);
});
}, false);
But this line document.execCommand('insertImage', false, result);
seems that it doesn't work.
I tried to do an alert instead and it worked.
Why the document.execCommand()
doesn't executed ? and how can I solve this problem ?