Add effect to request editor measure on state changes

This commit is contained in:
2026-02-01 04:01:38 +01:00
parent f0b7a49611
commit 3456700ccd

View File

@@ -400,6 +400,12 @@ export default function App() {
editorValueRef.current = body; editorValueRef.current = body;
}, [body]); }, [body]);
useEffect(() => {
const view = editorViewRef.current;
if (!view) return;
view.requestMeasure();
}, [markdownPreview, textSize, sidebarCollapsed, historyOpen]);
const refreshTexts = useCallback(async () => { const refreshTexts = useCallback(async () => {
setLoadingTexts(true); setLoadingTexts(true);