Skip to content

Commit

Permalink
🎨 fix #1560
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Feb 10, 2024
1 parent 667e2e6 commit f8d078a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ts/wysiwyg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,12 @@ class WYSIWYG {
}

// 打开链接
if (event.target.tagName === "A") {
const a = hasClosestByMatchTag(event.target, "A");
if (a) {
if (vditor.options.link.click) {
vditor.options.link.click(event.target);
vditor.options.link.click(a);
} else if (vditor.options.link.isOpen) {
window.open(event.target.getAttribute("href"));
window.open(a.getAttribute("href"));
}
event.preventDefault();
return;
Expand Down

0 comments on commit f8d078a

Please sign in to comment.