diff --git a/src/workspaces/components/MarkdownEditor.tsx b/src/workspaces/components/MarkdownEditor.tsx deleted file mode 100644 index be3c14dd..00000000 --- a/src/workspaces/components/MarkdownEditor.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { useState } from 'react'; -import md from 'markdown-it'; -import ReactMarkdown from 'react-markdown'; -import remarkGfm from 'remark-gfm'; -import rehypeRaw from 'rehype-raw'; -import { Button } from '@/components/ui/button'; -import { Code, Eye } from 'lucide-react'; - -type MarkdownEditorProps = { - content: string; - onChange: (content: string) => void; - placeholder?: string; - greeting?: string; - firstName?: string; - lastName?: string; -}; - -export function MarkdownEditor({ - content, - onChange, - placeholder = 'Enter markdown...', - greeting, - firstName, - lastName, -}: MarkdownEditorProps) { - const [showPreview, setShowPreview] = useState(false); - - const markdown = md({ - html: true, - breaks: true, - linkify: true, - }); - - const processGreeting = (text: string) => { - return text - .replace(/\{\{firstName\}\}/g, firstName || '') - .replace(/\{\{fullName\}\}/g, `${firstName || ''} ${lastName || ''}`.trim()); - }; - - const processedGreeting = greeting ? processGreeting(greeting) : ''; - const greetingHtml = processedGreeting ? `

${processedGreeting}

` : ''; - const preview = markdown.render(content); - - return ( -
- {/* Toolbar */} -
- - -
- - {/* Content Area */} -
- {!showPreview ? ( -