diff --git a/apps/web/app/components/workspace/markdown-editor.tsx b/apps/web/app/components/workspace/markdown-editor.tsx index d234861b318..eab8bf03f1e 100644 --- a/apps/web/app/components/workspace/markdown-editor.tsx +++ b/apps/web/app/components/workspace/markdown-editor.tsx @@ -399,7 +399,7 @@ export function MarkdownEditor({ {/* Bubble menu for text selection */} - +
) => void; - deleteNode: () => void; - selected: boolean; -}) { +}: ReactNodeViewProps) { + const configAttr = node.attrs.config as string; const [showSource, setShowSource] = useState(false); - const [editValue, setEditValue] = useState(node.attrs.config); + const [editValue, setEditValue] = useState(configAttr); let parsedConfig: ReportConfig | null = null; let parseError: string | null = null; try { - const parsed = JSON.parse(node.attrs.config); + const parsed = JSON.parse(configAttr); if (parsed?.panels && Array.isArray(parsed.panels)) { parsedConfig = parsed as ReportConfig; } else { @@ -76,7 +72,7 @@ function ReportBlockView({ if (showSource) { handleSaveSource(); } else { - setEditValue(node.attrs.config); + setEditValue(configAttr); setShowSource(true); } }} @@ -128,7 +124,7 @@ function ReportBlockView({