making the image button of the editor actually add all the info needed, and made the images clickable for the full size
This commit is contained in:
@@ -635,11 +635,14 @@ function drawImage(editor) {
|
||||
var stat = getState(cm);
|
||||
var options = editor.options;
|
||||
var url = "http://";
|
||||
if(options.promptURLs) {
|
||||
if(options.imageURLFn) {
|
||||
url = options.imageURLFn();
|
||||
} else if(options.promptURLs) {
|
||||
url = prompt(options.promptTexts.image);
|
||||
if(!url) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!url) {
|
||||
return false;
|
||||
}
|
||||
_replaceSelection(cm, stat.image, options.insertTexts.image, url);
|
||||
}
|
||||
@@ -2026,4 +2029,4 @@ SimpleMDE.prototype.toTextArea = function() {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SimpleMDE;
|
||||
module.exports = SimpleMDE;
|
||||
Reference in New Issue
Block a user