|
@@ -93,9 +93,9 @@ class IR {
|
|
if (this.preventInput) {
|
|
if (this.preventInput) {
|
|
this.preventInput = false;
|
|
this.preventInput = false;
|
|
processAfterRender(vditor, {
|
|
processAfterRender(vditor, {
|
|
- enableAddUndoStack: true,
|
|
|
|
- enableHint: true,
|
|
|
|
- enableInput: true,
|
|
|
|
|
|
+ enableAddUndoStack: true,
|
|
|
|
+ enableHint: true,
|
|
|
|
+ enableInput: true,
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -149,10 +149,9 @@ class IR {
|
|
// 打开链接
|
|
// 打开链接
|
|
const aElement = hasClosestByAttribute(event.target, "data-type", "a");
|
|
const aElement = hasClosestByAttribute(event.target, "data-type", "a");
|
|
if (aElement && (!aElement.classList.contains("vditor-ir__node--expand"))) {
|
|
if (aElement && (!aElement.classList.contains("vditor-ir__node--expand"))) {
|
|
- if (vditor.options.link && vditor.options.link.trigger) {
|
|
|
|
- vditor.options.link.trigger(aElement.querySelector(":scope > .vditor-ir__marker--link").textContent);
|
|
|
|
- }
|
|
|
|
- if (vditor.options.link && vditor.options.link.open) {
|
|
|
|
|
|
+ if (vditor.options.link.trigger) {
|
|
|
|
+ vditor.options.link.trigger(aElement.querySelector(":scope > .vditor-ir__marker--link"));
|
|
|
|
+ } else if (vditor.options.link.open) {
|
|
window.open(aElement.querySelector(":scope > .vditor-ir__marker--link").textContent);
|
|
window.open(aElement.querySelector(":scope > .vditor-ir__marker--link").textContent);
|
|
}
|
|
}
|
|
return;
|
|
return;
|