From b1a97834c9326cf8673699dc3c62ed1f8baa6d2e Mon Sep 17 00:00:00 2001 From: lucaronin Date: Mon, 27 Apr 2026 11:54:15 +0200 Subject: [PATCH] fix: keep raw editor full width --- .../EditorContentLayout.test.tsx | 14 ++++++++++ .../editor-content/EditorContentLayout.tsx | 26 +++++++++---------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/components/editor-content/EditorContentLayout.test.tsx b/src/components/editor-content/EditorContentLayout.test.tsx index a010c666..f2aaeff6 100644 --- a/src/components/editor-content/EditorContentLayout.test.tsx +++ b/src/components/editor-content/EditorContentLayout.test.tsx @@ -108,4 +108,18 @@ describe('EditorContentLayout', () => { expect(container.firstElementChild).toHaveClass('editor-content-layout--left') expect(screen.getByTestId('breadcrumb-bar')).toHaveAttribute('data-note-layout', 'left') }) + + it('keeps raw mode out of the centered rich-editor content wrapper', () => { + render() + + const rawEditor = screen.getByTestId('raw-editor-view') + const findScope = rawEditor.closest('[data-editor-find-scope="true"]') + + expect(findScope).toHaveClass('editor-scroll-area') + expect(rawEditor.closest('.editor-content-wrapper')).toBeNull() + }) }) diff --git a/src/components/editor-content/EditorContentLayout.tsx b/src/components/editor-content/EditorContentLayout.tsx index f2f1b74c..8817191f 100644 --- a/src/components/editor-content/EditorContentLayout.tsx +++ b/src/components/editor-content/EditorContentLayout.tsx @@ -90,20 +90,18 @@ function RawModeEditorSection({ return ( -
- {})} - onSave={onSave ?? (() => {})} - latestContentRef={rawLatestContentRef} - vaultPath={vaultPath} - locale={locale} - /> -
+ {})} + onSave={onSave ?? (() => {})} + latestContentRef={rawLatestContentRef} + vaultPath={vaultPath} + locale={locale} + />
) }