Skip to content

Commit f5b1e9a

Browse files
authored
Merge pull request #166 from episerver/bugfix/CMS-46488-remove-svg-support
CMS-46488 Enhance RichText documentation and update renderer to remove SVG support
2 parents 37eef4b + c21a13c commit f5b1e9a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/6.1-richtext-component-react.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ All element types listed below are supported by default and can be customized wi
6464
- **Code-related:** `code`, `pre`, `var`, `samp`
6565
- **Links & Interactive:** `link`, `a`, `button`, `label`
6666
- **Tables:** `table`, `thead`, `tbody`, `tfoot`, `caption`, `tr`, `th`, `td`
67-
- **Media:** `image`, `img`, `svg`, `canvas`
68-
- **Forms:** `input`, `select`, `option`, `textarea`
69-
- **Other:** `br`, `wbr`
67+
68+
> [!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.
69+
>
70+
> **Alternatives:** Use custom element handlers, upload SVG as image assets, or create dedicated React components.
71+
7072

7173
#### Example: Custom Elements
7274

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)