/** * EditorPanel.tsx - 文档编辑面板(新版) * * 完全重写版本,直接集成BlockEditor替代旧的MDXEditor * 保持Props接口兼容,确保与App.tsx的集成不需要修改 * * @module components/EditorPanel */ import React from 'react'; import { EditorWithOutline } from '../Editor/EditorWithOutline'; import './EditorPanel.css'; // ══════════════════════════════════════════════════════════════════════════════ // Component Props // ══════════════════════════════════════════════════════════════════════════════ export interface EditorPanelProps { /** 文档ID */ documentId: string; /** 初始文档名称(可选,从聊天消息传递) */ initialDocumentName?: string | null; /** 关闭回调 */ onClose: () => void; } // ══════════════════════════════════════════════════════════════════════════════ // Component // ══════════════════════════════════════════════════════════════════════════════ /** * EditorPanel - 文档编辑面板 * * 新版本:极简外壳,直接集成BlockEditor * * 变更说明: * - ✅ Props接口保持不变,与旧版本完全兼容 * - ✅ 删除了WYSIWYGEditor(MDXEditor) * - ✅ 直接使用BlockEditor作为编辑器内核 * - ✅ 保留文档大纲功能(由BlockEditor内部处理) * * @example * ```tsx * closePreview()} * /> * ``` */ export const EditorPanel: React.FC = ({ documentId, initialDocumentName, onClose, }) => { return (
{/* 集成带大纲的编辑器 */}
); }; export default EditorPanel;