Store editor
About section
The rich-text description editor and its text styles.
Available
Needs mock props
Examples
Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.
About section
Rendered live from Storybook
Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.
Props
The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.
| Prop | Type | Default | Description |
|---|---|---|---|
about* | string | — | The long description as an HTML string. Seeded into the editor once on mount — the field is a `contentEditable`, so React cannot re-render it without destroying the caret. |
onAboutChange* | (about: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
productType* | ProductKindType | — | Chooses the placeholder. Uses the canonical `ProductKindType` union. |
placeholders | Partial<Record<ProductKindType, string>> | ABOUT_PLACEHOLDERS | Override the placeholder map. Defaults to `ABOUT_PLACEHOLDERS`. |
placeholderFallback | string | ABOUT_PLACEHOLDER_FALLBACK | Undocumented — add TSDoc to the prop in the library. |
initialShowPlaceholder | boolean | — | Seeds the placeholder overlay. Defaults to "show it when `about` is empty" — the app hardcoded `true`, which floated the placeholder over existing copy. |
initialActiveStyle | TextStyle | "h1" | Seeds the highlighted block-style button. The app kept this in `useState` only, so no toolbar state other than H1 was reachable as a static story. |
initialBold | boolean | false | Undocumented — add TSDoc to the prop in the library. |
initialItalic | boolean | false | Undocumented — add TSDoc to the prop in the library. |
initialStrikethrough | boolean | false | Undocumented — add TSDoc to the prop in the library. |
defaultLinkPopoverOpen | boolean | false | Opens the link popover on mount so it is a static story, not a click path. |
initialLinkUrl | string | "" | Seeds the link box so "half-typed a URL" is a static story. |
className | string | — | Undocumented — add TSDoc to the prop in the library. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/store/editor/sections/AboutSection.tsx- Portability
- Needs its app dependencies replaced by props before it renders in isolation.