mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-12 15:42:34 +01:00
This commit is contained in:
parent
338851fcab
commit
1716436eca
13 changed files with 47 additions and 48 deletions
|
|
@ -476,12 +476,12 @@ export const globalShortcut = (app: App) => {
|
|||
const initData = item.headElement.getAttribute("data-initdata");
|
||||
if (item.model instanceof Editor) {
|
||||
rootId = ` data-node-id="${item.model.editor.protyle.block.rootID}"`;
|
||||
icon = unicode2Emoji(item.docIcon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true);
|
||||
icon = unicode2Emoji(item.docIcon || Constants.SIYUAN_IMAGE_FILE, "b3-list-item__graphic", true);
|
||||
} else if (initData) {
|
||||
const initDataObj = JSON.parse(initData);
|
||||
if (initDataObj.instance === "Editor") {
|
||||
rootId = ` data-node-id="${initDataObj.rootId}"`;
|
||||
icon = unicode2Emoji(item.docIcon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true);
|
||||
icon = unicode2Emoji(item.docIcon || Constants.SIYUAN_IMAGE_FILE, "b3-list-item__graphic", true);
|
||||
}
|
||||
}
|
||||
tabHtml += `<li data-index="${index}" data-id="${item.id}"${rootId} class="b3-list-item${currentId === item.id ? " b3-list-item--focus" : ""}"${currentId === item.id ? ' data-original="true"' : ""}>${icon}<span class="b3-list-item__text">${escapeHtml(item.title)}</span></li>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue