From 76e178969c33be87c5dc3cf1a9c2bf53d9ce9c28 Mon Sep 17 00:00:00 2001 From: celine Date: Thu, 8 Jan 2026 18:40:50 -0500 Subject: [PATCH] keep text size when user enters to make new textblock --- components/Blocks/TextBlock/keymap.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/Blocks/TextBlock/keymap.ts b/components/Blocks/TextBlock/keymap.ts index 861adf2f..1012c137 100644 --- a/components/Blocks/TextBlock/keymap.ts +++ b/components/Blocks/TextBlock/keymap.ts @@ -555,6 +555,20 @@ const enter = }, }); } + let [textSize] = + (await repRef.current?.query((tx) => + scanIndex(tx).eav(propsRef.current.entityID, "block/text-size"), + )) || []; + if (textSize) { + await repRef.current?.mutate.assertFact({ + entity: newEntityID, + attribute: "block/text-size", + data: { + type: "text-size-union", + value: textSize.data.value, + }, + }); + } }; asyncRun().then(() => { useUIState.getState().setSelectedBlock({ -- 2.51.2