Commit b9310d7
feat(web): enriched text component (#651)
# Summary
The `EnrichedText` component has been implemented with the support of
basic props:
- `style`
- `htmlStyle`
- `children`
- `selectionColor`
The core displaying feature of the component is fully functional and
should be identical to the `EnrichedTextInput`. The `EnrichedText`
specific parts of `htmlStyle` is not yet implemented, as these are
_press_ specific actions - outside of this PR's scope. 'htmlStyle` is
currently only handled on the shared part with the `EnrichedTextInput`.
As we are using `dangerouslySetInnerHtml`, proper sanitization of the
html was provided using `dompurify`.
## Test Plan
On the root page a "Set Enriched Text" button was added to easily test
the component. You write something in the input, press the button to
apply the html to the `EnrichedText` component and the visible content
should look identical
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| Web | ✅ |
## Checklist
- [x] E2E tests are passing
- [x] Required E2E tests have been added (if applicable)
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Igor Furgała <74370735+exploIF@users.noreply.github.com>1 parent d4ee950 commit b9310d7
54 files changed
Lines changed: 1705 additions & 610 deletions
File tree
- .playwright
- screenshots
- tests
- apps/example-web/src
- testScreens
- docs
- src
- utils
- web
- constants
- formats
- normalization
- sanitization
- styleConversion
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Loading
0 commit comments