From ad31227f7cb407a13406e3f3a86c213f48ee867b Mon Sep 17 00:00:00 2001 From: Thomas des Francs Date: Wed, 1 Jul 2026 18:22:59 +0200 Subject: [PATCH] Fix BlockNote placeholder alignment + paddings (#22409) ## Before image ## After file-c55b9d7bc3bd212f18f8c77a0318eaef --- .../blocknote-editor/components/BlockEditor.tsx | 3 ++- .../components/DashboardsBlockEditor.tsx | 12 +++++++++++- .../show-page/components/FieldRichTextCard.tsx | 5 +++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx b/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx index 80fd485cec..a4e21c6dba 100644 --- a/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx +++ b/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx @@ -88,7 +88,8 @@ const StyledEditor = styled.div` } & .bn-inline-content { - width: 100%; + max-width: 100%; + min-width: 0; } & .bn-container .bn-suggestion-menu-item:hover { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx index 504d1df7fc..a1f7d21679 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx @@ -76,8 +76,18 @@ const StyledEditor = styled.div` padding-inline: 0px; } + & .bn-block-content { + min-width: 0; + } + + & .bn-block-content, & .bn-inline-content { - width: 100%; + overflow-wrap: anywhere; + } + + & .bn-inline-content { + max-width: 100%; + min-width: 0; } & .bn-container .bn-suggestion-menu-item:hover { diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx index 21c9483ac9..22f2b4d24c 100644 --- a/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx +++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx @@ -18,8 +18,9 @@ const ActivityRichTextEditor = lazy(() => const StyledShowPageActivityContainer = styled.div` box-sizing: border-box; - margin-top: ${themeCssVariables.spacing[6]}; - padding-inline: 44px; + margin-top: ${themeCssVariables.spacing[2]}; + padding-left: ${themeCssVariables.spacing[6]}; + padding-right: ${themeCssVariables.spacing[2]}; width: 100%; `;