This commit is contained in:
2026-02-06 02:36:02 +03:00
parent 8f38e4bbac
commit d87d57ab3c

View File

@ -94,7 +94,7 @@ export function CourseEditor({ content, onChange }: CourseEditorProps) {
if (!editorRef.current) return; if (!editorRef.current) return;
const mermaidNodes = editorRef.current.querySelectorAll('pre[data-language="mermaid"]'); const mermaidNodes = editorRef.current.querySelectorAll('pre[data-language="mermaid"]');
if (mermaidNodes.length === 0) return; if (mermaidNodes.length === 0) return;
mermaid.run({ nodes: Array.from(mermaidNodes), suppressErrors: true }).catch(() => {}); mermaid.run({ nodes: Array.from(mermaidNodes) as HTMLElement[], suppressErrors: true }).catch(() => {});
}, [content]); }, [content]);
const setLink = useCallback(() => { const setLink = useCallback(() => {