|
|
@ -929,14 +929,35 @@ function _mediaClass(type) {
|
|
|
|
function _mediaAttrs(srcTag) {
|
|
|
|
function _mediaAttrs(srcTag) {
|
|
|
|
return _getAttrList(unescape(srcTag));
|
|
|
|
return _getAttrList(unescape(srcTag));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _mediaEmbed(attrs) {
|
|
|
|
function _mediaEmbed(attrs,target) {
|
|
|
|
var html = '<embed ';
|
|
|
|
if(target && target === "media"){
|
|
|
|
|
|
|
|
var html = [[],"<img class=\"mediaIco\" src=\"../../images/video.png\" "],_ww = window.screen.width,_wh = window.screen.height;//_docHeight(window.document);
|
|
|
|
|
|
|
|
_each(attrs, function(key, val) {
|
|
|
|
|
|
|
|
if(key === "src"){
|
|
|
|
|
|
|
|
html[0].push("<a class=\"mediaIcobox\" href=\"javascript:window.open('"+ val+"','newwindow','");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
if(key === "width"){
|
|
|
|
|
|
|
|
html[0].push("width="+val,",left="+(_ww-val)/2 + ",");
|
|
|
|
|
|
|
|
}else if(key === "height"){
|
|
|
|
|
|
|
|
html[0].push("height="+val,",top="+(_wh-val)/2);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
html.push(key, "=\"" , val , "\" ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
html[0].push("')\">");
|
|
|
|
|
|
|
|
html[0] = html[0].join("");
|
|
|
|
|
|
|
|
html.push("/></a>");
|
|
|
|
|
|
|
|
return html.join("");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
var html = '<img ';
|
|
|
|
_each(attrs, function(key, val) {
|
|
|
|
_each(attrs, function(key, val) {
|
|
|
|
html += key + '="' + val + '" ';
|
|
|
|
html += key + '="' + val + '" ';
|
|
|
|
});
|
|
|
|
});
|
|
|
|
html += '/>';
|
|
|
|
html += '/>';
|
|
|
|
return html;
|
|
|
|
return html;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
function _mediaImg(blankPath, attrs) {
|
|
|
|
function _mediaImg(blankPath, attrs) {
|
|
|
|
var width = attrs.width,
|
|
|
|
var width = attrs.width,
|
|
|
|
height = attrs.height,
|
|
|
|
height = attrs.height,
|
|
|
@ -6039,7 +6060,7 @@ _plugin('core', function(K) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
attrs.width = _undef(imgAttrs.width, width);
|
|
|
|
attrs.width = _undef(imgAttrs.width, width);
|
|
|
|
attrs.height = _undef(imgAttrs.height, height);
|
|
|
|
attrs.height = _undef(imgAttrs.height, height);
|
|
|
|
return _mediaEmbed(attrs);
|
|
|
|
return _mediaEmbed(attrs,"media");
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.replace(/<img[^>]*class="?ke-anchor"?[^>]*>/ig, function(full) {
|
|
|
|
.replace(/<img[^>]*class="?ke-anchor"?[^>]*>/ig, function(full) {
|
|
|
|
var imgAttrs = _getAttrList(full);
|
|
|
|
var imgAttrs = _getAttrList(full);
|
|
|
|