diff --git a/apps/web/app/components/workspace/editor-toolbar-primitives.tsx b/apps/web/app/components/workspace/editor-toolbar-primitives.tsx
new file mode 100644
index 00000000000..c408597d1fd
--- /dev/null
+++ b/apps/web/app/components/workspace/editor-toolbar-primitives.tsx
@@ -0,0 +1,60 @@
+"use client";
+
+import type React from "react";
+
+export function ToolbarGroup({ children }: { children: React.ReactNode }) {
+ return
{children}
;
+}
+
+export function ToolbarDivider() {
+ return ;
+}
+
+export function ToolbarButton({
+ active,
+ onClick,
+ title,
+ children,
+ disabled,
+}: {
+ active: boolean;
+ onClick: () => void;
+ title: string;
+ children: React.ReactNode;
+ disabled?: boolean;
+}) {
+ return (
+
+ );
+}
+
+export function BubbleButton({
+ active,
+ onClick,
+ title,
+ children,
+}: {
+ active: boolean;
+ onClick: () => void;
+ title: string;
+ children: React.ReactNode;
+}) {
+ return (
+
+ );
+}
diff --git a/apps/web/app/components/workspace/markdown-editor.tsx b/apps/web/app/components/workspace/markdown-editor.tsx
index bc7f71929b0..edc0d91c5cd 100644
--- a/apps/web/app/components/workspace/markdown-editor.tsx
+++ b/apps/web/app/components/workspace/markdown-editor.tsx
@@ -17,6 +17,7 @@ import { useState, useCallback, useEffect, useRef, useMemo } from "react";
import { ReportBlockNode, preprocessReportBlocks, postprocessReportBlocks } from "./report-block-node";
import { createSlashCommand, createWorkspaceMention, createFileMention, type TreeNode, type MentionSearchFn } from "./slash-command";
+import { ToolbarGroup, ToolbarDivider, ToolbarButton, BubbleButton } from "./editor-toolbar-primitives";
import { isWorkspaceLink } from "@/lib/workspace-links";
// --- Types ---
@@ -654,60 +655,5 @@ function EditorToolbar({
);
}
-// --- Toolbar primitives ---
-
-function ToolbarGroup({ children }: { children: React.ReactNode }) {
- return {children}
;
-}
-
-function ToolbarDivider() {
- return ;
-}
-
-function ToolbarButton({
- active,
- onClick,
- title,
- children,
-}: {
- active: boolean;
- onClick: () => void;
- title: string;
- children: React.ReactNode;
-}) {
- return (
-
- );
-}
-
-// --- Bubble menu button ---
-
-function BubbleButton({
- active,
- onClick,
- title,
- children,
-}: {
- active: boolean;
- onClick: () => void;
- title: string;
- children: React.ReactNode;
-}) {
- return (
-
- );
-}
+// Toolbar primitives shared with rich-document-editor
+export { ToolbarGroup, ToolbarDivider, ToolbarButton, BubbleButton };