magicpen-media
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -88,7 +88,15 @@ /*global URL, Blob, btoa*/ | ||
var attributeStr = attributes.length ? ' ' + attributes.join(' ') : ''; | ||
var html = ''; | ||
if (options.link) { | ||
html += '<a href="' + entitify(options.link === true ? src : options.link) + '">'; | ||
} | ||
if (!majorContentType || majorContentType === 'image') { | ||
return '<img' + attributeStr + '>'; | ||
html += '<img' + attributeStr + '>'; | ||
} else { | ||
return '<' + majorContentType + attributeStr + '></' + majorContentType + '>'; | ||
html += '<' + majorContentType + attributeStr + '></' + majorContentType + '>'; | ||
} | ||
if (options.link) { | ||
html += '</a>'; | ||
} | ||
return html; | ||
} | ||
@@ -95,0 +103,0 @@ }, |
{ | ||
"name": "magicpen-media", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Add media support to magicpen (images, audio, video)", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
518918
13923