Skip to content

Commit eb62586

Browse files
committed
docs: tweaks
1 parent d1feece commit eb62586

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/docs/fundamentals/core-concepts.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,22 @@ sources.
4545
:::
4646

4747
## Normalization
48-
HTML can be messy. When users paste rich text from applications like Google Docs or Microsoft Word, the HTML often contains additional wrapper elements, inline styles, and structural quirks that may not match the HTML structure expected by the library.
4948

50-
To handle this, both components provide a `useHtmlNormalizer` prop that normalizes incoming HTML. The normalizer cleans and restructures the input into the predictable format the library expects (e.g. it maps `<strong>` to `<b>`, unwraps `<div>` containers into `<p>` tags, and strips unsupported tags). The `useHtmlNormalizer` prop defaults to `true`.
49+
HTML can be messy. Whether users paste rich text from applications like Google Docs or Microsoft Word, or you inject external HTML via `defaultValue`, `setValue`, or pass it directly as `children` into `EnrichedText`, the markup often contains additional wrapper elements, inline styles, and structural quirks that may not match the HTML structure expected by the library..
50+
51+
To handle this, both components provide a `useHtmlNormalizer` prop that normalizes incoming HTML. The normalizer cleans and restructures the input into the predictable format the library relies on (e.g., it maps `<strong>` to `<b>`, unwraps `<div>` containers into `<p>` tags, and strips unsupported tags). The `useHtmlNormalizer` prop defaults to `true`.
52+
5153
All supported and canonical tags are listed in [Supported tags](/fundamentals/html-format-and-supported-tags).
5254

53-
## Two components, one styling API
55+
## Two components, one HTML format
5456

5557
The library is split into an editor and a viewer:
5658

5759
- **`EnrichedTextInput`** — the interactive editor from the previous page.
5860
- **`EnrichedText`** — a read-only display component that renders the input's
5961
HTML.
6062

61-
Both accept the same `htmlStyle` prop, which describes how each tag looks
62-
(heading sizes, blockquote borders, code block colors, and so on). Because they
63-
share it, text looks identical whether it's being edited or displayed — no
64-
drift between the two. A common setup edits in `EnrichedTextInput`, stores the
65-
`getHTML` output, and later shows it with `EnrichedText`.
63+
The HTML format that both components expect is identical, what allows you to integrate them seamlessly. A common setup edits in `EnrichedTextInput`, stores the `getHTML` output, and later displays it with `EnrichedText`.
6664

6765
## The style state model
6866

docs/docs/fundamentals/html-format-and-supported-tags.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ is represented by `<br>`. So a document with a heading, a blank line and a
7373
paragraph comes out like this:
7474

7575
```html
76-
<h1>Title</h1>
77-
<br>
78-
<p>Some body text.</p>
76+
<html>
77+
<h1>Title</h1>
78+
<br>
79+
<p>Some body text.</p>
80+
</html>
7981
```

0 commit comments

Comments
 (0)