diff --git a/src/components/editor/Editor/BacklinksPanel.tsx b/src/components/editor/Editor/BacklinksPanel.tsx
new file mode 100644
index 0000000..4a2424d
--- /dev/null
+++ b/src/components/editor/Editor/BacklinksPanel.tsx
@@ -0,0 +1,176 @@
+import { useState } from 'react';
+import {
+ Link2,
+ ChevronDown,
+ ChevronRight,
+ FileText,
+ FolderOpen,
+ ArrowUpRight,
+ ArrowDownLeft,
+} from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import type { Backlink } from '../hooks/useBacklinks';
+
+interface BacklinksPanelProps {
+ backlinks: Backlink[];
+ outgoingLinks: Backlink[];
+ onNavigateToNote: (noteId: string) => void;
+}
+
+export function BacklinksPanel({
+ backlinks,
+ outgoingLinks,
+ onNavigateToNote,
+}: BacklinksPanelProps) {
+ const [isBacklinksExpanded, setIsBacklinksExpanded] = useState(true);
+ const [isOutgoingExpanded, setIsOutgoingExpanded] = useState(true);
+
+ const totalLinks = backlinks.length + outgoingLinks.length;
+
+ if (totalLinks === 0) {
+ return null;
+ }
+
+ return (
+
+ {/* Backlinks Section */}
+ {backlinks.length > 0 && (
+
+
+
+ {isBacklinksExpanded && (
+
+ {backlinks.map((backlink) => (
+
+ ))}
+
+ )}
+
+ )}
+
+ {/* Outgoing Links Section */}
+ {outgoingLinks.length > 0 && (
+
+
+
+ {isOutgoingExpanded && (
+
+ {outgoingLinks.map((link) => (
+
+ ))}
+
+ )}
+
+ )}
+
+ );
+}
+
+/**
+ * Compact version for showing in status bar or header
+ */
+interface BacklinksIndicatorProps {
+ backlinksCount: number;
+ outgoingCount: number;
+ onClick?: () => void;
+}
+
+export function BacklinksIndicator({
+ backlinksCount,
+ outgoingCount,
+ onClick,
+}: BacklinksIndicatorProps) {
+ const totalLinks = backlinksCount + outgoingCount;
+
+ if (totalLinks === 0) {
+ return null;
+ }
+
+ return (
+
+ );
+}
diff --git a/src/components/editor/Editor/Toolbar.tsx b/src/components/editor/Editor/Toolbar.tsx
index da5e320..35e6e96 100644
--- a/src/components/editor/Editor/Toolbar.tsx
+++ b/src/components/editor/Editor/Toolbar.tsx
@@ -18,6 +18,7 @@ import {
CheckSquare,
ChevronDown,
Link,
+ Link2,
Minus,
Highlighter,
FileText,
@@ -171,14 +172,29 @@ function ToolbarComponent({ editor }: ToolbarProps) {
>
-
+
+
+
+
+
+
+
+ External Link
+
+ editor.chain().focus().insertContent('[[').run()}>
+
+ Link to Note
+
+
+