"use client"; import React, { useState, useEffect } from 'react'; import { Image, FileText, Link, List } from 'lucide-react'; interface EditorProps { note?: { id: string; title: string; content: string; }; onSave?: (note: { id: string; title: string; content: string }) => void; } export const Editor: React.FC = ({ note, onSave }) => { const [title, setTitle] = useState(note?.title || ''); const [content, setContent] = useState(note?.content || ''); useEffect(() => { if (note) { setTitle(note.title); setContent(note.content); } }, [note]); const handleTitleChange = (e: React.ChangeEvent) => { setTitle(e.target.value); }; const handleContentChange = (e: React.ChangeEvent) => { setContent(e.target.value); }; const handleSave = () => { if (note?.id) { onSave?.({ id: note.id, title, content }); } }; return (
{/* Title Bar */}
{/* Toolbar */}
{/* Editor Area */}