diff --git a/client/src/features/product-form/ui/ProductFormFields.tsx b/client/src/features/product-form/ui/ProductFormFields.tsx index ecb22d3..2bc21ea 100644 --- a/client/src/features/product-form/ui/ProductFormFields.tsx +++ b/client/src/features/product-form/ui/ProductFormFields.tsx @@ -13,6 +13,7 @@ import Typography from '@mui/material/Typography' import { Controller, type UseFormReturn } from 'react-hook-form' import type { Category } from '@/entities/product/model/types' import { OptimizedImage } from '@/shared/ui/OptimizedImage' +import { RichTextMessageEditor } from '@/shared/ui/RichTextMessageEditor' import { isValidProductPriceRub, isValidProductQuantity } from '../lib/use-product-form-helpers' import type { FormState } from '../model/types' @@ -63,11 +64,19 @@ export function ProductFormFields({ )} /> - } - /> + + + Описание + + Стилизованный текст: жирный, курсив, список + ( + + )} + /> + 0 ? : null} - {p.description || p.shortDescription ? ( - {p.description} + {p.description ? ( + ) : ( Описание появится позже. )} diff --git a/client/src/shared/ui/RichTextMessageContent.tsx b/client/src/shared/ui/RichTextMessageContent.tsx index 5cc6f8c..a488316 100644 --- a/client/src/shared/ui/RichTextMessageContent.tsx +++ b/client/src/shared/ui/RichTextMessageContent.tsx @@ -5,7 +5,7 @@ import TiptapStarterKit from '@tiptap/starter-kit' type RichTextMessageContentProps = { value: string - tone?: 'default' | 'review' | 'chat' + tone?: 'default' | 'review' | 'chat' | 'product' } export function RichTextMessageContent({ value, tone = 'default' }: RichTextMessageContentProps) { @@ -32,7 +32,7 @@ export function RichTextMessageContent({ value, tone = 'default' }: RichTextMess return (