Skip to content

Commit b6f3e59

Browse files
committed
docs: web docs update
1 parent f2c8f2a commit b6f3e59

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

docs/WEB.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Web support is still experimental. APIs and behavior can change in future releases without a major version bump. Expect breaking changes until the web path is stabilized.
44

5-
## What works
5+
## Enriched Text Input
6+
7+
### What works
68

79
- Inline marks: bold, italic, underline, strikethrough, inline code
810
- Headings (h1-h6)
@@ -18,20 +20,35 @@ Web support is still experimental. APIs and behavior can change in future releas
1820
- Keyboard shortcuts for formatting
1921
- `useHtmlNormalizer`
2022

21-
## Keyboard shortcuts
23+
### Keyboard shortcuts
2224

2325
See [Web Keyboard Shortcuts](./INPUT_API_REFERENCE.md#web-keyboard-shortcuts) for the up-to-date list of Web keyboard shortcuts.
2426

25-
## Unsupported
27+
### Unsupported
2628

2729
- **`returnKeyLabel`**: ignored on web, it's not possible to set it inside a browser.
2830
- **Automatic link detection**: `linkRegex` is ignored. Links only work when set explicitly via the `setLink` ref method.
2931
- **Context menu**: `contextMenuItems` is ignored.
3032
- **RN layout ref methods**: `measure`, `measureInWindow`, `measureLayout`, and `setNativeProps` are no-ops.
31-
- **`EnrichedText`**: The read-only component is not exported on web.
3233
- **`ViewProps`**: Props inherited from `View` beyond the implemented subset are not forwarded.
3334
- **`textShortcuts`**: ignored on web.
3435

36+
## Enriched Text
37+
38+
### What works
39+
40+
- Setting the content using the `children` prop.
41+
- HTML's formatting equivalent to the input component's.
42+
- Customizing the styling using props: `style`, `htmlStyle`, `selectionColor`.
43+
44+
### Unsupported
45+
46+
- **`selectable`**: ignored on web.
47+
- **`useHtmlNormalizer`**: ignored on web.
48+
- **`ellipsizeMode`**: ignored on web.
49+
- **`numberOfLines`**: ignored on web.
50+
- **Press events**: `onLinkPress` and `onMentionPress` callbacks are ignored on web.
51+
3552
## HTML sanitization
3653

3754
You are responsible for sanitizing HTML on both input and output. The library does not guarantee safe or clean HTML output. This applies to any HTML you persist, render elsewhere, or accept from untrusted sources (XSS, paste attacks, etc.).

0 commit comments

Comments
 (0)