Skip to content

Commit b9cf111

Browse files
docs: make web stable (#727)
# Summary Update docs for stable web ## Test Plan ## Screenshots / Videos ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ❌ | | Android | ❌ | | Web | ✅ | ## Checklist - [ ] E2E tests are passing - [ ] Required E2E tests have been added (if applicable)
1 parent 383177c commit b9cf111

4 files changed

Lines changed: 4 additions & 45 deletions

File tree

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- ⚡ Fully native input and display components (Supports New Architecture only)
1212
- 💻 HTML-based parsing with live, synchronous text styling
1313
- 🎨 Fully customizable styles for seamless UI integration
14-
- 🌐 Solid mobile support with an experimental Web implementation
14+
- 🌐 Solid mobile and web support
1515

1616
`EnrichedTextInput`, the rich text input component is an uncontrolled input. This means that it doesn't use any state or props to store its value, but instead directly interacts with the underlying platform-specific components. Thanks to this, the component is really performant and simple to use while offering complex and advanced features no other solution has.
1717

@@ -40,13 +40,12 @@ We can help you build your next dream product –
4040
- [EnrichedText component](#enrichedtext-component)
4141
- [API Reference](#api-reference)
4242
- [Known limitations](#known-limitations)
43-
- [Future Plans](#future-plans)
4443
- [Contributing](#contributing)
4544
- [License](#license)
4645

4746
## Prerequisites
4847

49-
- `react-native-enriched-html` currently supports Android and iOS, Web implementation is still experimental.
48+
- `react-native-enriched-html` currently supports Android, iOS and Web.
5049
- It works only with [the React Native New Architecture (Fabric)](https://reactnative.dev/architecture/landing-page) and supports following React Native releases: `0.81`, `0.82`, `0.83`, `0.84`, `0.85` and `0.86`.
5150

5251
## Installation
@@ -290,7 +289,7 @@ You can find some examples in the [usage section](#usage) or in the example app.
290289
- [onFocus](docs/INPUT_API_REFERENCE.md#onfocus) - emits whenever input focuses.
291290
- [onBlur](docs/INPUT_API_REFERENCE.md) - emits whenever input blurs.
292291
- [onChangeText](docs/INPUT_API_REFERENCE.md#onchangetext) - returns the input's text anytime it changes.
293-
- [onChangeHtml](docs/INPUT_API_REFERENCE.md#onchangehtml) - returns HTML string parsed from current input text and styles anytime it would change. As parsing the HTML on each input change is a pretty expensive operation, not assigning the event's callback will speed up iOS input a bit. We are considering adding some API to improve it, see [future plans](#future-plans).
292+
- [onChangeHtml](docs/INPUT_API_REFERENCE.md#onchangehtml) - returns HTML string parsed from current input text and styles anytime it would change. As parsing the HTML on each input change is a pretty expensive operation, not assigning the event's callback will speed up iOS input a bit.
294293
- [onChangeSelection](docs/INPUT_API_REFERENCE.md#onchangeselection) - returns all the data needed for working with selections (as of now it's mainly useful for [links](#links)).
295294
- [onLinkDetected](docs/INPUT_API_REFERENCE.md#onlinkdetected) - returns link's detailed info whenever user selection is near one.
296295
- [onMentionDetected](docs/INPUT_API_REFERENCE.md#onmentiondetected) - returns mention's detailed info whenever user selection is near one.
@@ -379,10 +378,6 @@ See the [EnrichedText API Reference](docs/TEXT_API_REFERENCE.md) for the `Enrich
379378

380379
- Only one level of lists is supported. We currently do not support nested lists.
381380

382-
## Future Plans
383-
384-
- Web support: currently in the experimental stage. Details in [docs/WEB.md](docs/WEB.md).
385-
386381
## Contributing
387382

388383
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

docs/INPUT_API_REFERENCE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# API Reference
22

3-
> **Web support is experimental.** Behavior may change without a major version bump.
4-
53
## Props
64

75
### `allowFontScaling`

docs/TEXT_API_REFERENCE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# EnrichedText API Reference
22

3-
> **Web support is experimental.** Behavior may change without a major version bump.
4-
53
## Props
64

75
### `allowFontScaling`

docs/WEB.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
1-
# Web Support (Experimental)
2-
3-
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.
1+
# Web Support
42

53
## Enriched Text Input
64

7-
### What works
8-
9-
- Inline marks: bold, italic, underline, strikethrough, inline code
10-
- Headings (h1-h6)
11-
- Blockquote, code block
12-
- Ordered lists, unordered lists, checkbox lists
13-
- Images (via `setImage` ref method and optional `onPasteImages` when pasting image data)
14-
- Manual links (via `setLink` ref method)
15-
- Mentions
16-
- Automatic link detection
17-
- `getHTML`, `setValue`, selection mapping
18-
- Core callbacks: `onChange`, `onChangeState`, `onFocus`, `onBlur`, `onSelectionChange`
19-
- Submit props: `submitBehavior` and `onSubmitEditing`. `returnKeyType` is only a hint, it maps to [enterkeyhint](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) (`done`, `go`, `next`, `previous`, `search`, `send`, `default`/`enter`). Not all values of `ReturnKeyTypeOptions` are supported, the behavior of this prop is heavily dependent on the browser's capabilities.
20-
- Input theming via `placeholderTextColor`, `cursorColor` and `selectionColor` props
21-
- Keyboard shortcuts for formatting
22-
- `useHtmlNormalizer`
23-
- Setting text alignment via `setTextAlignment()`
24-
- `textShortcuts`
25-
265
### Keyboard shortcuts
276

287
See [Web Keyboard Shortcuts](./INPUT_API_REFERENCE.md#web-keyboard-shortcuts) for the up-to-date list of Web keyboard shortcuts.
@@ -36,17 +15,6 @@ See [Web Keyboard Shortcuts](./INPUT_API_REFERENCE.md#web-keyboard-shortcuts) fo
3615

3716
## Enriched Text
3817

39-
### What works
40-
41-
- Customizing the styling using props: `style`, `htmlStyle`, `selectionColor`.
42-
- `selectable` prop
43-
- `useHtmlNormalizer`
44-
- `onLinkPress` and `onMentionPress` callbacks
45-
- Truncation via `numberOfLines` and `ellipsizeMode` (`head`, `middle`, `tail`, `clip`).
46-
47-
> [!NOTE]
48-
> Truncation measures the rendered DOM in a layout effect, so it only runs on the client. Under SSR the server renders no text and the clamped content appears after hydration - expect a flash / layout shift on first paint when combining `numberOfLines` with `ellipsizeMode`.
49-
5018
### Unsupported
5119

5220
- **RN layout ref methods**: `measure`, `measureInWindow`, `measureLayout`, and `setNativeProps` are no-ops.

0 commit comments

Comments
 (0)