fix(react/type_widget): mind map attachment incorrect

This commit is contained in:
Elian Doran 2025-09-21 10:32:01 +03:00
parent e117fbd471
commit 58b14ae31c
No known key found for this signature in database

View File

@ -26,7 +26,7 @@ export default function MindMap({ note, ntxId }: TypeWidgetProps) {
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
const spacedUpdate = useEditorSpacedUpdate({ const spacedUpdate = useEditorSpacedUpdate({
note, note,
getData: () => { getData: async () => {
if (!apiRef.current) return; if (!apiRef.current) return;
return { return {
content: apiRef.current.getDataString(), content: apiRef.current.getDataString(),
@ -35,7 +35,7 @@ export default function MindMap({ note, ntxId }: TypeWidgetProps) {
role: "image", role: "image",
title: "mindmap-export.svg", title: "mindmap-export.svg",
mime: "image/svg+xml", mime: "image/svg+xml",
content: apiRef.current.exportSvg().text(), content: await apiRef.current.exportSvg().text(),
position: 0 position: 0
} }
] ]