Skip to content

Releases: meliorence/react-native-render-html

v3.0.0

02 Oct 09:57
Compare
Choose a tag to compare

v3.0.0

This is a major overhaul of the whole module, adding a lot of features, fixing numerous bugs, and... breaking some things. The whole codebase has been refactored and cleaned-up. The javascript style and linters have been updated accordingly.

Demo

This component now comes with a demo that showcases every feature. It will be very useful to keep track of bugs and rendering differences between the different versions of react-native.

It will be mandatory to refer to an example of the demo or to provide one when submitting an issue or a pull request for a new feature.

New features

  • The whole parsing and rendering logic has been written from scratch. It shoud now be able to render anything you throw at it without breaking a sweat (we mean without crashing)
  • Greatly improve & fix the default renderer of images, with support for broken links in a browser-like way
  • Add support for em sizing !
  • Add support for percentage sizing !
  • Add ignoredTags prop, you're now able to get rid of those nasty <script> or <blink> (seriously ?) more easily
  • Add ignoredStyles prop. Want to make sure no background-color is applied through the style attribute ? You got it
  • Add more parameters to your custom renderers, like the CSS styling that has been converted
  • (experimental), use a remote website as the source of parsed HTML !
  • Add a default renderer for <iframes> & <i> tags
  • Add classesStyles prop to style your components with their respective HTML classes
  • Add ignoreNodesFunction prop so you can ignore HTML tags very precisely

Fixes

  • You shouldn't encounter random line breaks in your texts when using tags like <em>, <i>, <strong>... even if they're not wrapped in a parent like <p>
  • Properly re-render everything if the HTML source changes
  • Images nested inside <a> should behave and receive taps properly
  • Don't crash when tapping an <a> tag without href attribute
  • Prevent the manual prop-checking handling the CSS to RN conversions from drowning you with YellowBoxes

v2.1.0

18 Aug 15:50
Compare
Choose a tag to compare

Courtesy @duyphambhtech :)

  • Remove shallowCompare and replace with PureComponent
  • Fix crash when <img> tag has no src attribute
  • Render <br> tag
  • Render <sub> and <sup>
  • Fix import PropTypes from prop-types
  • Convert code to conform to Javascript Standard Style
  • Fix crash calling PropTypes validators directly

v2.0.0

10 Apr 09:41
Compare
Choose a tag to compare

Compatibility with react-native 0.43.2+ (react 16)

v1.0.0

10 Apr 09:38
Compare
Choose a tag to compare

Initial release, usable with react >= 0.20 <= 0.42.2 (react 15)