-
Notifications
You must be signed in to change notification settings - Fork 57
docs: miscellaneous section #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hejsztynx
wants to merge
11
commits into
feat/docs
Choose a base branch
from
@ksienkiewicz/docs-misc
base: feat/docs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
be2cc76
feat: wip
hejsztynx 31ecc4e
feat: remove irrelevant content
hejsztynx 9dc732a
docs: add react native compatibility table
kacperzolkiewski d3aec98
docs: add comparison with other libraries
kacperzolkiewski 0bc11a9
fix: review changes
kacperzolkiewski b034548
Update docs/docs/misc/compatibility.mdx
hejsztynx dab6c7d
docs: acknowledge exampe-web app
hejsztynx c0dc699
docs: unnecessary rn new arch note
hejsztynx ef5f475
docs: link swm
hejsztynx 584c241
fix: library description
kacperzolkiewski 5e8cd00
Merge branch 'feat/docs' into @ksienkiewicz/docs-misc
hejsztynx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| sidebar_position: 1 | ||
| --- | ||
|
|
||
| # Compatibility | ||
|
|
||
| This page is the single source of truth for the React Native versions the | ||
| library supports and for the small set of behaviours that differ between | ||
| platforms. | ||
|
|
||
| :::info | ||
|
|
||
| React Native Enriched HTML works **only** with the | ||
| [React Native New Architecture (Fabric)](https://reactnative.dev/architecture/landing-page). | ||
| The New Architecture is enabled by default on recent React Native versions. If | ||
| your app still runs the old architecture, you'll need to switch before | ||
| installing. | ||
|
|
||
| ::: | ||
|
|
||
| ## Supported React Native versions | ||
|
|
||
| The table assumes you're using the latest patch of each library minor version. | ||
|
|
||
| <EnrichedCompatibility /> | ||
|
|
||
| ## Platform differences | ||
|
|
||
| Android, iOS and Web are built on different text systems, so a few APIs | ||
| behave differently depending on the platform. These are platform | ||
| characteristics, not library bugs, and they're collected here. For limitations that affect | ||
| every platform, see [Known limitations](/misc/known-limitations) instead. | ||
|
|
||
| ### Justified text alignment (Android) | ||
|
|
||
| On Android, `'justify'` is accepted in the type signature but has no justified | ||
| layout effect - the paragraph is shown with its natural alignment, the same as | ||
| `'auto'`. This applies both to `setTextAlignment('justify')` and to the `justify` value reported by | ||
| `onChangeState`. | ||
|
|
||
| ### `ellipsizeMode` with multiple lines (Android) | ||
|
|
||
| On Android, when `numberOfLines` is set to a value higher than `1`, only the | ||
| `'tail'` value of `ellipsizeMode` works correctly. | ||
|
|
||
| ### Custom context menu (iOS 16+, ordering) | ||
|
|
||
| Custom context-menu items (`contextMenuItems`) require **iOS 16 or newer** on | ||
| iOS. On iOS, items appear in array order, before the system items | ||
| (Copy/Paste/Cut). On Android there is no guaranteed order, and custom items may | ||
| be shown in a submenu depending on the device manufacturer. On the Web the | ||
| native editing menu isn't available at all, so the prop is ignored - build your | ||
| own UI instead. | ||
|
|
||
| ### Return key behaviour | ||
|
|
||
| - **`returnKeyType`** on Android it's accepted but ignored, because | ||
| `returnKeyType` doesn't work with multiline inputs. On the Web it maps to the | ||
| browser's [`enterkeyhint`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint). | ||
| - **`returnKeyLabel`** is supported on Android but not on iOS, and can't be set | ||
| inside a browser, so it's ignored on the Web. | ||
|
|
||
| ### Cursor / selection color | ||
|
|
||
| The `cursorColor` prop is applied on Android and Web. On iOS the caret and | ||
| selection color follow the system tint. | ||
|
|
||
| ## HTML is not sanitized (Mobile) | ||
|
Copilot marked this conversation as resolved.
Outdated
|
||
|
|
||
| On iOS and Android, the library does not sanitize HTML. It makes no guarantees that the markup it accepts or produces is safe. You are fully responsible for sanitizing any HTML you persist, render elsewhere, or accept from untrusted sources. | ||
|
|
||
| Sanitization _is_ enforced on the web, as injecting unsafe HTML directly into the DOM poses severe security risks (like XSS). | ||
|
|
||
| ### React Native layout ref methods | ||
|
|
||
| On Web those methods are no-ops. These include: `measure`, | ||
| `measureInWindow`, `measureLayout`, and `setNativeProps`. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.