// components/minimal-editor.js import React, { useRef } from "react"; import { Editor } from "@tinymce/tinymce-react"; function MinimalEditor(props) { const editorRef = useRef(null); const handleInit = (evt, editor) => { editorRef.current = editor; // Set initial content if provided if (props.initialData) { editor.setContent(props.initialData); } // Simple onChange handler - no debouncing, no complex logic editor.on('change', () => { if (props.onChange) { props.onChange(editor.getContent()); } }); }; return ( ); } export default MinimalEditor;