|
|
|
@ -929,13 +929,26 @@ function _mediaClass(type) {
|
|
|
|
|
function _mediaAttrs(srcTag) {
|
|
|
|
|
return _getAttrList(unescape(srcTag));
|
|
|
|
|
}
|
|
|
|
|
function _mediaEmbed(attrs) {
|
|
|
|
|
var html = '<embed ';
|
|
|
|
|
function _mediaEmbed(attrs,target) {
|
|
|
|
|
if(target && target === "media"){
|
|
|
|
|
var html = ["","<img src=\"../../images/video.png\" "];
|
|
|
|
|
_each(attrs, function(key, val) {
|
|
|
|
|
if(key === "src"){
|
|
|
|
|
html[0] = "<a href=\"" + val + "\" target=\"_blank\">";
|
|
|
|
|
}else{
|
|
|
|
|
html.push(key, "=\"" , val , "\" ");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
html.push("/></a>");
|
|
|
|
|
return html.join("");
|
|
|
|
|
}else{
|
|
|
|
|
var html = '<img ';
|
|
|
|
|
_each(attrs, function(key, val) {
|
|
|
|
|
html += key + '="' + val + '" ';
|
|
|
|
|
});
|
|
|
|
|
html += '/>';
|
|
|
|
|
return html;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function _mediaImg(blankPath, attrs) {
|
|
|
|
|
var width = attrs.width,
|
|
|
|
@ -6018,7 +6031,7 @@ _plugin('core', function(K) {
|
|
|
|
|
}
|
|
|
|
|
attrs.width = _undef(imgAttrs.width, width);
|
|
|
|
|
attrs.height = _undef(imgAttrs.height, height);
|
|
|
|
|
return _mediaEmbed(attrs);
|
|
|
|
|
return _mediaEmbed(attrs,"media");
|
|
|
|
|
})
|
|
|
|
|
.replace(/<img[^>]*class="?ke-anchor"?[^>]*>/ig, function(full) {
|
|
|
|
|
var imgAttrs = _getAttrList(full);
|
|
|
|
|