Skip to content

Build your personal knowledge base with Trilium Notes

feat(markdown): add include note to slash commands

Elian Doran045c301a0172
diff --git a/apps/client/src/widgets/type_widgets/code/Markdown.tsx b/apps/client/src/widgets/type_widgets/code/Markdown.tsx
index fe6d03ea26..4181d1f3c7 100644
--- a/apps/client/src/widgets/type_widgets/code/Markdown.tsx
+++ b/apps/client/src/widgets/type_widgets/code/Markdown.tsx
@@ -382,6 +382,14 @@ function useSlashCommands(parentComponent: TypeWidgetProps["parentComponent"], e
view.dispatch({ changes: { from, to } });
parentComponent?.triggerCommand("insertDateTimeToText");
}
+ },
+ {
+ label: "/include",
+ detail: "Include another note",
+ apply(view, _completion, from, to) {
+ view.dispatch({ changes: { from, to } });
+ parentComponent?.triggerCommand("addIncludeNoteToText");
+ }
}
]
};