diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts index 6731292fc..11a554ba6 100644 --- a/app/src/layout/dock/index.ts +++ b/app/src/layout/dock/index.ts @@ -199,18 +199,6 @@ export class Dock { } }); break; - // TODO: remove - // case "backlink": - // tab = new Tab({ - // callback(tab: Tab) { - // tab.addModel(new Backlinks({ - // type: "pin", - // tab, - // blockId: editor?.protyle?.block?.rootID, - // })); - // } - // }); - // break; case "backlink": tab = new Tab({ callback(tab: Tab) { diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 1a0c9327a..8bad79d9b 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -484,10 +484,11 @@ export class Toolbar { nextIndex = item.textContent.length; nextElement.innerHTML = item.innerHTML + nextElement.innerHTML; } else if (item.tagName !== "BR") { + if (item.getAttribute("data-type")?.indexOf("backslash") > -1 && + item.firstChild?.textContent === "\\") { + item.firstChild.remove(); + } item.setAttribute("data-type", types.join(" ")); - item.querySelectorAll("span").forEach(backslashItem => { - backslashItem.remove(); - }); setFontStyle(item, textObj); newNodes.push(item); } else {