import Editor from "@monaco-editor/react"; import Tabs from "../tabs/tabs"; import { editor } from "monaco-editor"; import { RefObject } from "react"; export default function EditorPanel({ html, setHtml, isAiWorking, setError, editorRef, }: { html: string; setHtml: (h: string) => void; isAiWorking: boolean; setError: (e: boolean) => void; editorRef: RefObject; }) { return (
setError(markers.length > 0)} onChange={(v) => setHtml(v ?? "")} onMount={(editor) => { if (editorRef) { editorRef.current = editor; } }} options={{ readOnly: isAiWorking, minimap: { enabled: false }, scrollBeyondLastLine: false, }} width="100%" height="100%" />
); }