Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
generate embed_tag <img> for oembed.type = 'photo'
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Aug 15, 2014
1 parent 8aab92d commit 49b68d9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
9 changes: 8 additions & 1 deletion dist/js/addons/medium-editor-insert-embeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@

if (this.options.oembedProxy) {
that.getOEmbedHTML(url, function(error, oebmed) {
processEmbedTag(!error && oebmed.html);

var html = !error && oebmed && oebmed.html;

if (oebmed && !oebmed.html && oebmed.type === 'photo' && oebmed.url) {
html = '<img src="' + oebmed.url + '" />';
}

processEmbedTag(html);
});
} else {
var embed_tag = that.convertUrlToEmbedTag(url);
Expand Down
2 changes: 1 addition & 1 deletion dist/js/addons/medium-editor-insert-embeds.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion dist/js/medium-editor-insert-plugin.all.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,14 @@

if (this.options.oembedProxy) {
that.getOEmbedHTML(url, function(error, oebmed) {
processEmbedTag(!error && oebmed.html);

var html = !error && oebmed && oebmed.html;

if (oebmed && !oebmed.html && oebmed.type === 'photo' && oebmed.url) {
html = '<img src="' + oebmed.url + '" />';
}

processEmbedTag(html);
});
} else {
var embed_tag = that.convertUrlToEmbedTag(url);
Expand Down
Loading

0 comments on commit 49b68d9

Please sign in to comment.