Allow bold formatting in the spotlight product's marketing text
Products.spotlightText switches from a plain textarea to a richText field (Lexical, same default editor as every other richText field here) so admins get a formatting toolbar. Rendered via a small dedicated inline converter (bold + paragraphs only) rather than the full block-oriented RichText.tsx, which is styled for article-length content (blog posts, legal pages) and would add heading/paragraph spacing this teaser doesn't want.
This commit is contained in:
+8
-2
@@ -203,7 +203,13 @@ export type Product = {
|
||||
spotlight: boolean;
|
||||
spotlightEyebrow: string | null;
|
||||
spotlightHeadline: string | null;
|
||||
spotlightText: string | null;
|
||||
// Lexical richText JSON (switched from plain textarea 2026-08-25 so
|
||||
// admins can bold parts of the teaser) — rendered by
|
||||
// ProductSpotlight.tsx's own minimal inline converter, not the full
|
||||
// article-oriented RichText.tsx (that one adds block-level heading/
|
||||
// paragraph spacing meant for blog posts/legal pages, wrong fit for a
|
||||
// single teaser paragraph).
|
||||
spotlightText: unknown | null;
|
||||
spotlightImage: string | null;
|
||||
// Per-product opt-in for a wishlist heart on the homepage spotlight —
|
||||
// independent of (in addition to) the global wishlistEnabled toggle,
|
||||
@@ -262,7 +268,7 @@ type PayloadProduct = {
|
||||
spotlight: boolean;
|
||||
spotlightEyebrow: string | null;
|
||||
spotlightHeadline: string | null;
|
||||
spotlightText: string | null;
|
||||
spotlightText: unknown | null;
|
||||
spotlightImage: { url: string } | number | null;
|
||||
spotlightShowWishlist: boolean;
|
||||
trackInventory: boolean;
|
||||
|
||||
Reference in New Issue
Block a user