📝 bookmark

This commit is contained in:
Vanessa 2023-08-07 11:45:05 +08:00
parent cad913e4c8
commit 398afa854f

View file

@ -67,7 +67,7 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
icon: "iconTrashcan",
label: window.siyuan.languages.remove,
click: () => {
const bookmarkText = (id ? element.parentElement.previousElementSibling : element).querySelector(".b3-list-item__text").textContent;
const bookmarkText = element.querySelector(".b3-list-item__text").textContent;
confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmarkText)}</b>?`, () => {
if (id) {
fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {