import { useEffect, useRef } from 'react'; import { BaseEditor } from '../../editor/editor'; export const FileEditor = () => { const containerRef = useRef(null); useEffect(() => { const editor = new BaseEditor(); if (containerRef.current) { editor.createEditor(containerRef.current); } return () => { editor.destroyEditor(); }; }, []); return
; };