"use client"; import React, { useEffect, useRef } from 'react'; import { Editor } from '@tinymce/tinymce-react'; interface OptimizedEditorProps { initialData?: string; onChange?: (data: string) => void; height?: number; placeholder?: string; disabled?: boolean; readOnly?: boolean; } const OptimizedEditor: React.FC = ({ initialData = '', onChange, height = 400, placeholder = 'Start typing...', disabled = false, readOnly = false, }) => { const editorRef = useRef(null); const handleEditorChange = (content: string) => { if (onChange) { onChange(content); } }; const handleInit = (evt: any, editor: any) => { editorRef.current = editor; }; return ( ); }; export default OptimizedEditor;