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:
2017-07-16 18:30:04 -07:00
parent 5897b6874d
commit ab6152cbfa
10 changed files with 19031 additions and 17837 deletions
+8 -5
View File
@@ -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;