|
@@ -424,11 +424,12 @@ class WYSIWYG {
|
|
}
|
|
}
|
|
|
|
|
|
// 打开链接
|
|
// 打开链接
|
|
- if (event.target.tagName === "A") {
|
|
|
|
|
|
+ const a = hasClosestByMatchTag(event.target, "A");
|
|
|
|
+ if (a) {
|
|
if (vditor.options.link.click) {
|
|
if (vditor.options.link.click) {
|
|
- vditor.options.link.click(event.target);
|
|
|
|
|
|
+ vditor.options.link.click(a);
|
|
} else if (vditor.options.link.isOpen) {
|
|
} else if (vditor.options.link.isOpen) {
|
|
- window.open(event.target.getAttribute("href"));
|
|
|
|
|
|
+ window.open(a.getAttribute("href"));
|
|
}
|
|
}
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
return;
|
|
return;
|