diff --git a/src/js/simplemde.js b/src/js/simplemde.js index 016d693..b658b73 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -634,14 +634,49 @@ function drawImage(editor) { var cm = editor.codemirror; var stat = getState(cm); var options = editor.options; - var url = "http://"; - if(options.promptURLs) { - url = prompt(options.promptTexts.image); - if(!url) { - return false; - } - } - _replaceSelection(cm, stat.image, options.insertTexts.image, url); + var altText = cm.getSelection(); + if(altText == ""){ + altText="image"; + } + + var imgDialog = $('