Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(client): `internalBookmark` not hidden
Elian Doran480da09bcca6
diff --git a/apps/client/src/services/attribute_renderer.ts b/apps/client/src/services/attribute_renderer.tsindex 01d6337367..c93620b3b2 100644--- a/apps/client/src/services/attribute_renderer.ts+++ b/apps/client/src/services/attribute_renderer.ts@@ -7,6 +7,10 @@ async function renderAttribute(attribute: FAttribute, renderIsInheritable: booleconst isInheritable = renderIsInheritable && attribute.isInheritable ? `(inheritable)` : "";const $attr = $("<span>");+ if (attribute.isAutoLink) {+ return $attr;+ }+if (attribute.type === "label") {$attr.append(document.createTextNode(`#${attribute.name}${isInheritable}`));@@ -15,9 +19,6 @@ async function renderAttribute(attribute: FAttribute, renderIsInheritable: boole$attr.append(document.createTextNode(formatValue(attribute.value)));}} else if (attribute.type === "relation") {- if (attribute.isAutoLink) {- return $attr;- }// when the relation has just been created, then it might not have a valueif (attribute.value) {diff --git a/apps/client/src/widgets/ribbon/AutoLinkAttributesTab.tsx b/apps/client/src/widgets/ribbon/AutoLinkAttributesTab.tsxindex 132a55a8a3..1d54edbfb6 100644--- a/apps/client/src/widgets/ribbon/AutoLinkAttributesTab.tsx+++ b/apps/client/src/widgets/ribbon/AutoLinkAttributesTab.tsx@@ -51,6 +51,10 @@ function AutoLinkAttribute({ attribute }: { attribute: FAttribute }) {}async function renderAutoLink(attribute: FAttribute) {+ if (attribute.type === "label") {+ return `#${escapeHtml(attribute.name)}=${escapeHtml(attribute.value)}`;+ }+const note = await froca.getNote(attribute.value);if (!note) return "";diff --git a/apps/client/src/widgets/type_widgets/text/EditableText.tsx b/apps/client/src/widgets/type_widgets/text/EditableText.tsxindex a002cde7e9..760e00e489 100644--- a/apps/client/src/widgets/type_widgets/text/EditableText.tsx+++ b/apps/client/src/widgets/type_widgets/text/EditableText.tsx@@ -264,13 +264,6 @@ export default function EditableText({ note, parentComponent, ntxId, noteContexteditor.setData(contentRef.current);parentComponent?.triggerEvent("textEditorRefreshed", { ntxId, editor });- // Scroll to bookmark anchor if navigated with ?bookmark=...- const viewScope = noteContext?.viewScope;- if (viewScope?.bookmark) {- const el = editor.editing.view.getDomRoot()?.querySelector(`[id="${CSS.escape(viewScope.bookmark)}"]`);- el?.scrollIntoView({ behavior: "smooth", block: "center" });- viewScope.bookmark = undefined;- }}}/>}