KE复制粘贴的时候保留图片的外链

yuanke
yuanke 9 years ago
parent 4b7fa3a040
commit 7c729107cc

@ -371,7 +371,8 @@ function df(myself) {
sstr += that.attr("src") + "|"; sstr += that.attr("src") + "|";
} }
else if (that.attr("src").indexOf("data:image") >= 0){ else if (that.attr("src").indexOf("data:image") >= 0){
that.parents().removeAttr("href"); //删除所有父节点的href //去掉外链
// that.parents().removeAttr("href"); //删除所有父节点的href
} }
} }
}); });
@ -421,10 +422,10 @@ function uploadpic(piclist,myself) {
//复制过来带的链接class等都要去掉 和视频图片有关系 //复制过来带的链接class等都要去掉 和视频图片有关系
that.removeAttr("class"); that.removeAttr("class");
that.parent().removeAttr("class"); //去掉外链
that.parents().removeAttr("href"); //删除所有父节点的href // that.parent().removeAttr("class");
// that.parent().removeAttr("href"); // that.parents().removeAttr("href"); //删除所有父节点的href
that.parent().removeAttr("data-ke-src"); // that.parent().removeAttr("data-ke-src");
tIndex = tIndex + 1; tIndex = tIndex + 1;
} }
} }

Loading…
Cancel
Save