mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-06 12:50:16 +01:00
This commit is contained in:
parent
5b3fa67332
commit
190fa7f8c4
3 changed files with 15 additions and 7 deletions
|
|
@ -329,7 +329,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
|
|||
id: "copyBlockRef",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyBlockRef,
|
||||
click: async () => {
|
||||
click: () => {
|
||||
let text = "";
|
||||
for (let i = 0; i < ids.length; i++) {
|
||||
const id = ids[i];
|
||||
|
|
@ -338,8 +338,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
|
|||
if (cellElement.getAttribute("data-detached") === "true") {
|
||||
content = cellElement.querySelector(".av__celltext").textContent;
|
||||
} else {
|
||||
const response = await fetchSyncPost("/api/block/getRefText", {id});
|
||||
content = `((${id} '${response.data}'))`;
|
||||
content = `((${id} '${cellElement.querySelector(".av__celltext").textContent}'))`;
|
||||
}
|
||||
if (ids.length > 1) {
|
||||
text += "* ";
|
||||
|
|
@ -399,7 +398,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
|
|||
id: "copyProtocolInMd",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyProtocolInMd,
|
||||
click: async () => {
|
||||
click: () => {
|
||||
let text = "";
|
||||
for (let i = 0; i < ids.length; i++) {
|
||||
const id = ids[i];
|
||||
|
|
@ -408,8 +407,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
|
|||
if (cellElement.getAttribute("data-detached") === "true") {
|
||||
content = cellElement.querySelector(".av__celltext").textContent;
|
||||
} else {
|
||||
const response = await fetchSyncPost("/api/block/getRefText", {id});
|
||||
content = `[${response.data}](siyuan://blocks/${id})`;
|
||||
content = `[${cellElement.querySelector(".av__celltext").textContent}](siyuan://blocks/${id})`;
|
||||
}
|
||||
if (ids.length > 1) {
|
||||
text += "* ";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue