Support audio and video elements
This commit is contained in:
@@ -55,6 +55,18 @@ MdRenderer.prototype.image = function(href, title, text) {
|
|||||||
{ type: 'image/svg+xml',
|
{ type: 'image/svg+xml',
|
||||||
data: href,
|
data: href,
|
||||||
alt: text }).outerHTML
|
alt: text }).outerHTML
|
||||||
|
else if (/^video:/.test(text))
|
||||||
|
return h('video', {
|
||||||
|
controls: 'controls',
|
||||||
|
src: this.opts.blob_base + href,
|
||||||
|
title: title || undefined
|
||||||
|
}).outerHTML
|
||||||
|
else if (/^audio:/.test(text))
|
||||||
|
return h('audio', {
|
||||||
|
controls: 'controls',
|
||||||
|
src: this.opts.blob_base + href,
|
||||||
|
title: title || undefined
|
||||||
|
}).outerHTML
|
||||||
else
|
else
|
||||||
return h('img',
|
return h('img',
|
||||||
{ src: this.opts.img_base + href,
|
{ src: this.opts.img_base + href,
|
||||||
|
|||||||
Reference in New Issue
Block a user