1.1.2 • Published 7 months ago

nwon-html-to-react v1.1.2

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 months ago

NWON-html-to-react

This packages provides you with a complete tooling for turning HTML into react components. It enables you to define exactly which tags you want to replace with what component.

Main exports

For replacing HTML with react components we expose:

  • replaceHtmlWithComponent - A function that takes an HTML string and a map of components to react components
  • replaceEmojis - A function that replaces emojis in a string with stable counterparts

We also expose the following useful things for sanitizing HTML:

  • SanitizeHtml - A component that returns sanitized HTML
  • useSanitizedHtml - A hook that returns sanitized HTML
  • sanitizeHtml - A function that returns sanitized HTML
1.1.2

7 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.0

1 year ago