mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 15:09:29 +08:00
🚨
This commit is contained in:
parent
0f8e2969ee
commit
0d62b16da9
@ -1641,12 +1641,12 @@ export class WYSIWYG {
|
|||||||
// 需放在嵌入块之前,否则嵌入块内的引用、链接、pdf 双链无法点击打开 https://ld246.com/article/1630479789513
|
// 需放在嵌入块之前,否则嵌入块内的引用、链接、pdf 双链无法点击打开 https://ld246.com/article/1630479789513
|
||||||
const blockRefElement = hasClosestByAttribute(event.target, "data-type", "block-ref");
|
const blockRefElement = hasClosestByAttribute(event.target, "data-type", "block-ref");
|
||||||
const aElement = hasClosestByAttribute(event.target, "data-type", "a") || hasClosestByAttribute(event.target, "data-type", "url");
|
const aElement = hasClosestByAttribute(event.target, "data-type", "a") || hasClosestByAttribute(event.target, "data-type", "url");
|
||||||
let aLink = ""
|
let aLink = "";
|
||||||
if (aElement) {
|
if (aElement) {
|
||||||
if (aElement.classList.contains("av__celltext")) {
|
if (aElement.classList.contains("av__celltext")) {
|
||||||
aLink = aElement.textContent.trim()
|
aLink = aElement.textContent.trim();
|
||||||
} else {
|
} else {
|
||||||
aLink = aElement.getAttribute("data-href")
|
aLink = aElement.getAttribute("data-href");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (blockRefElement || aLink.startsWith("siyuan://blocks/")) {
|
if (blockRefElement || aLink.startsWith("siyuan://blocks/")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user