From b2e12bd3bc5243e0524102de4614c31c8aade7da Mon Sep 17 00:00:00 2001 From: fulopdaniel Date: Mon, 9 Sep 2024 11:12:54 +0200 Subject: [PATCH 1/3] fix(RTE): ordered list points can break into multiple lines --- .../ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx | 2 +- .../UnorderedListPlugin/UnorderedListMarkupElement.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx b/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx index 6fba41b915..335dbae793 100644 --- a/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx +++ b/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx @@ -24,7 +24,7 @@ const getNestingLevel = (editor: PlateEditor, element: TElement) => { }; export const getOrderedListClasses = (nestingLevel: number) => - `tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${ + `tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${ LIST_TYPES[nestingLevel % 3] }`; export const OL_STYLES = { counterReset: 'count' }; diff --git a/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListMarkupElement.tsx b/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListMarkupElement.tsx index 59fb50f5be..0dd59582f9 100644 --- a/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListMarkupElement.tsx +++ b/packages/fondue/src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListMarkupElement.tsx @@ -6,7 +6,7 @@ import { ELEMENT_UL } from '@udecode/plate-list'; import { MarkupElement } from '../../MarkupElement'; export const UL_CLASSES = - "[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]"; + "[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]"; export const UnorderedListMarkupElementNode = ({ attributes, children }: PlateRenderLeafProps) => (