mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 08:58:58 +01:00
fix(react/type_widget): mind map attachment incorrect
This commit is contained in:
parent
e117fbd471
commit
58b14ae31c
@ -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
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user