Skip to content

Commit cab7916

Browse files
committed
CMS-46488 Enhance RichText documentation and update renderer to remove SVG support
1 parent 6489039 commit cab7916

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

docs/6.1-richtext-component-react.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,17 @@ Custom React components for rendering specific element types. Allows you to over
5858
- **Headings:** `heading-one`, `heading-two`, `heading-three`, `heading-four`, `heading-five`, `heading-six`
5959
- **Text blocks:** `paragraph`, `quote`, `pre`, `div`
6060
- **Lists:** `bulleted-list`, `numbered-list`, `list-item`
61-
- **Inline:** `link`, `code`, `mark`, `sup`, `sub`, `ins`, `del`, `br`
62-
- **Tables:** `table`, `tbody`, `tr`, `th`, `td`
63-
- **Media:** `image`
61+
- **Text semantics (inline):** `span`, `mark`, `strong`, `em`, `u`, `s`, `i`, `b`, `small`, `sub`, `sup`, `ins`, `del`, `kbd`, `abbr`, `cite`, `dfn`, `q`, `data`, `bdo`, `bdi`
62+
- **Code-related:** `code`, `pre`, `var`, `samp`
63+
- **Links & Interactive:** `link`, `a`, `button`, `label`
64+
- **Tables:** `table`, `thead`, `tbody`, `tfoot`, `caption`, `tr`, `th`, `td`
65+
- **Media:** `image`, `img`, `canvas`
66+
- **Forms:** `input`, `select`, `option`, `textarea`
67+
- **Other:** `br`, `wbr`
68+
69+
> [!NOTE] > **SVG elements are not supported by default.** SVG requires specialized child elements (`circle`, `path`, `rect`, etc.) and attributes that would require extensive additional support.
70+
>
71+
> **Alternatives:** Use custom element handlers, upload SVG as image assets, or create dedicated React components.
6472
6573
#### Example: Custom Elements
6674

packages/optimizely-cms-sdk/src/components/richText/renderer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ export const defaultElementTypeMap: Record<
494494
// Media (when inline)
495495
image: { tag: 'img', config: { selfClosing: true } },
496496
img: { tag: 'img', config: { selfClosing: true } },
497-
svg: { tag: 'svg' },
498497
canvas: { tag: 'canvas' },
499498

500499
// Form elements

0 commit comments

Comments
 (0)