BUGFIX: uses markdown instead of HTML when inserting hyperlinked images

This commit is contained in:
Régis Hanol 2014-04-08 19:33:14 +02:00
parent b328fd0031
commit 79ad879170
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ Discourse.UploadSelectorView = Discourse.ModalBodyView.extend({
var imageLink = $('#link-input').val(); var imageLink = $('#link-input').val();
var composerView = this.get('controller.composerView'); var composerView = this.get('controller.composerView');
if (this.get("controller.showMore") && imageLink.length > 3) { if (this.get("controller.showMore") && imageLink.length > 3) {
composerView.addMarkdown("<a href='" + imageLink + "'>\n <img src='" + imageUrl + "'>\n</a>"); composerView.addMarkdown("[![](" + imageUrl +")](" + imageLink + ")");
} else { } else {
composerView.addMarkdown(imageUrl); composerView.addMarkdown(imageUrl);
} }