Skip to content

Latest commit

 

History

History
643 lines (446 loc) · 45.4 KB

File metadata and controls

643 lines (446 loc) · 45.4 KB

6.2.0-alpha.1 (2021-09-11)

Bug Fixes

  • a11y: anchors should not be set with a11y role "link" when empty href (dd988fc)
  • a11y: set accessibilityLabel for headings (h1..h6) to bypass RN limitation (bc37d88)

Features

  • new getNativePropsForTnode util method (d983d0d)
  • a11y: custom renderers passed onPress prop now have a11y roles (11723f0)
  • a11y: support aria-role="search" and aria-role="presentation" attributes (c552fe4)

6.2.0-alpha.0 (2021-09-05)

This release is focused on accessibility! Moreover, it empowers model-based custom rendering which can now define props passed to Text and View elements of renderers.

Bug Fixes

  • a11y: anchors are not accessible anymore when href is empty or absent (4e1f2f4)

Features

  • a11y: support aria-label and aria-role HTML attributes (2b27f00)
  • a11y: whatwg-compliant accessibility for images (7fc2907)
  • css: support user-select CSS property (8442b2f)
  • a11y: add accessibilityRole="header" to headings elements (h1...h6) (1c79bc3)
  • new reactNativeProps and getDynamicReactNativeProps in HTMLElementModel, this little change gives model-based custom rendering considerably more leverage. (4ee1646)
  • deprecate getUADerivedStyleFromAttributes in favor of getUADynamicMixedStyles in HTMLElementModel, which allows access to the underlying TNode and again empowers model-based custom rendering.

6.1.0 (2021-08-29)

Features

  • add new renderIndex and renderLength props to TDefaultRendererProps (4f032d3)
  • new enableExperimentalBRCollapsing prop to prevent extraneous spaces (e019a5a), closes #516, see official documentation
  • new enableExperimentalGhostLinesPrevention to circumvent RN bug (3645211), see official documentation
  • new provideEmbeddedHeaders prop to pass headers to img, iframes and other embedded in the future (2ea1ca6)
  • new bypassAnonymousTPhrasingNodes prop (90b8a3d), closes #514

Bug Fixes

  • prevent list markers from overflowing in a new line (f2238aa)

6.0.5 (2021-07-31)

Bug Fixes

  • test presence of "performance" global variable in useProfiler (7379c9b), closes #510

6.0.4 (2021-07-19)

Bug Fixes

  • npm v7 peer dependencies on @native-html/* (3d50b0e)

6.0.3 (2021-07-19)

Bug Fixes

  • peer-dependency failure wih npm@7 (002f555), closes #508

6.0.2 (2021-07-18)

No changes visible to consumers of this library.

6.0.1 (2021-07-17)

No changes visible to consumers of this library.

6.0.0 (2021-07-17)

The Foundry release is finally stable, and is now-on the recommended version. Check out the announcement blog post in our brand new website. We also have a migration guide for those who're coming from v5 and below.

This changelog highlights changes from v5. There are no changes since version 6.0.0-beta.8

Features

  • GenericPressable prop to customize the component wrapping interactive views (707374a), closes #472
  • pressableHightlightColor prop to customize pressable appearance (e5dfa1e)
  • access sharedProps from custom renderers (0d2199e)
  • accessibility for images with role and label (1accaf7)
  • add react-native field in package.json for metro (10dfc82)
  • allow module augmentation for renderers prop via RenderersProps (97dabc1)
  • configure enableExperimentalRtl in renderersProps.ol|ul (96daa5e)
  • configure getFallbackListStyleTypeFromNestLevel in renderersProps.ol|ul (1377ef7)
  • configure margins removal for nested lists in renderersProps.ol|ul (316e706)
  • experimental dangerouslyDisableHoisting prop (e6c7328)
  • export defaultListStyleSpecs for customization. (2f9ed01)
  • export defaultSystemFonts and defaultFallbackFonts (0c4207c)
  • export buildTREFromConfig for testing (c13e1a7)
  • new propsFromParent in custom renderers and children renderers (3bc1b52), closes #228
  • new renderersProps.(ol|ul).enableDynamicMarkerBoxWidth prop (f87b9f6)
  • new selectDomRoot prop to select a custom root (31bbff7)
  • new setMarkersForTNode prop (63caa4d)
  • new useIMGElementStateWithCache hook for images (54dc1bc)
  • new prop customListStyleSpecs to support additional list-style-type (84ec025)
  • new source type RenderHTMLSourceDom to render a DOM object (eeec894)
  • performant multi-instance HTML rendering with RenderHTMLSource (4e4cd09)
  • reexport CustomElementModel type from TRE (c5a01f0)
  • reexport HTMLModelRecord from TRE (a9c9cf3)
  • reexport isDomNode and isDomText from TRE (cedcf7a)
  • reexport SetMarkersForTNode from TRE (eaa3928)
  • reexport TNodeDescriptor from TRE (157983c)
  • reexport TNodePrintOptions type from TRE (6f3265c)
  • support "object-fit" CSS property for images (24f72b0)
  • support "start" attribute in ol and ul elements (b9d3154), closes #336
  • support "upper-latin" and "lower-lattin" list-style-type CSS props (a0da60d)
  • support enableRemove*MarginIfNested for list renderers (e0fe7c6)
  • support nodeIndex and parent fields in TNode (fe2504c)
  • support accessibility for a elements (6974ce6), closes #285
  • support decimal-leading-zero list style type prefix (526e226)
  • support default system fonts for Windows, Macos and web (4474dff)
  • support disclosure-* list style type prefixes (218982d)
  • support experimental RTL mode for ol and ul elements (ca139c1)
  • support lower-greek list style type prefixes (3aac2c8)
  • support lower-latin and upper-latin list prefix styles (4d4805c)
  • ts: new generic argument for renderers propsFromParent prop (6427732)
  • add defaultViewProps prop (ce49232)
  • add target argument to onLinkPress handler (139b0c3)
  • add getListStyleTypeFromNestLevel prop to HTMLListElement (5ae3e6a)
  • add new splitBoxModelStyle utility (b1adcbc)
  • enableExperimentalMarginCollapsing prop (ae6c553)
  • export useSharedProps (f1d7b16)
  • expose internal renderers building blocks for extensibility (213fcd7), closes #424
  • fallbackFonts and systemFonts props for font selection (6888a96)
  • implement defaultTextProps prop (c297ed1)
  • implement useInternalRenderer hook to reuse internal rendering logic (8c292da)
  • implement computeEmbeddedMaxWidth prop as per RFC001@2.0.0 (6c9d70f)
  • implement RenderHTMLDebug wrapper component to warn users (22625b4)
  • new cachedNaturalDimensions prop to useIMGelementState hook (ed976bb)
  • new onDocumentMetadataLoaded prop (9f55907)
  • new TRenderEngineProvider and RenderHTMLFragment components (7d50e72)
  • new extendInternalRenderer utility (d7bb1da)
  • new prop onTTreeChange (5ecdcab)
  • new renderChild prop to TChildrenRenderer (db78c54)
  • new renderers API (2547cba)
  • onHTMLLoaded prop (981b49b)
  • port alterData, alterChildren and alterNode (18dc001)
  • reeport useful types from css-processor (9b5e301)
  • reeport useful variables and types from transient-render-engine (0c0a9c6)
  • reuse 'img' renderer internal logic w/t useIMGElementState hook (399eb54), closes #424
  • support htmlParserOptions prop (624c57e)
  • support source prop, identical to react-native-webview (3a16487)
  • support a minimal table renderer (7f64d48)
  • support for loading HTML from URI (6c07b8d)
  • support relative URLs and document metadata (f2cbcfc)
  • support source.headers in useIMGElementState hook (a49e958)
  • triggerTREInvalidationPropNames prop (89ee25c)
  • useRendererProps hook (87982c4)
  • warn user of API misusage even when debug is set to false (cb5b42b)
  • new renderersProps.(ol|ul).markerTextStyle prop (6ca54e9)
  • support renderersProps.(ol|ul).markerBoxStyle prop (c929643)
  • new dev profiler to get feedback on short updates (98fd749)
  • use aspectRatio style to infer one dimension of images sizes (e018b30)
  • export collapseTopMarginForChild utility (199be12)

Performance Improvements

  • avoid calls to getImageDimensions API when provided in attrs (4f3d51d)
  • bypass anonymous TPhrasing nodes with one child or less (dad450d)
  • drop alter* props in favor of domVisitors (ffb1f58)
  • increase transient parsing speed by 30% after upgrade to v6.2.1 (df91a21)
  • limit rerenderings via memoization (6512e18)
  • memoize TDocumentRenderer to prevent rendering from ascendents (2ec060b)
  • replace ignoreDOMNode with ignoreDomNode (9ec6403)
  • replace ignoredTags with ignoredDomTags (b60d6eb)

Bug Fixes

  • loading image component doesn't display alt and borders anymore (1351ee5)
  • discard unsupported CSS inline methods (calc, var) (a2e7578)
  • images honor styles and physical size in "alt" (error) mode (059e5d6)
  • in <img> tags, style dimensions should prevail over attributes (de3b473)
  • list style prefixes now inherit from font*(weight,style,family) (191c45c)
  • don't peer-depend on prop-types, instead depend directly (27e843e)

And all these unlisted in commits: #94, #118, #144, #150, #151, #156, #165, #227, #228, #243, #263, #286, #312, #336, #344, #360, #369, #371 #414, #418, #419, #420, #424, #429, #432, #470, #481, #482, #484

BREAKING CHANGES

Those are breaking changes from v5. Consumers of the beta will not encounter breaking changes.

  • ignoredTags has been replaced with ignoredDomTags for naming consistency.
  • alterNode, alterData and alterChildren have been dropped in favor of domVisitors. The latter is an object with 3 optional callbacks, onElement, onDocument and onText which you can use to intercept and tamper nodes during parsing. Take advantage of domutils library to delete, insert and manipulate those nodes.
  • ignoreNodesFunction is now ignoreDomNode for naming consistency.
  • enableExperimentalPercentWidth has been discontinued. Use renderersProps.img.enableExperimentalPercentWidth instead.
  • onLinkPress prop has been discontinued. Use renderersProps.a.onPress instead.
  • imagesInitialDimensions has been moved to renderersProps.img.initialDimensions
  • listsPrefixesRenderers prop has been discontinued. Use customListStyleSpecs instead.
  • dropped ptSize prop. Point is supposed to be an absolute (pixel independent) size and unfit for display devices. It will be translated by the CSS processor to an absolute unit.
  • containerStyle and customContainer props have been dropped. Use baseStyle prop instead to style the root component.
  • drop textSelectable and allowFontScaling. Use defaultTextProps.selectable and defaultTextProps.allowFontScaling instead.
  • uri and html props have been dropped. Replace uri with source={{ uri: 'http://...' }} and html with source={{ html: '<div> ...' }}. The former now allows body, headers and method fields.
  • decodeEntities prop has been dropped. Pass this option to htmlParserOptions prop instead.
  • computeImagesMaxWidth has been replaced with computeEmbeddedMaxWidth. The two props are very similar, but the latest takes an extra argument, "tagName", which is the tag for which a width constrain should be enforced. It is planned to work with the @native-html/iframe-plugin extension.

v5.1.1

Bugfixes

  • wrong nodeIndex for children of ul and ol tags
  • alterChildren function return type

v5.1.0

Bugfixes

  • prop source.uri failing to cause HTML to load

Features

  • allowWhitespaceNodes prop to avoid removal of whitespace-filled text nodes
  • re-renders on baseFontStyle updates (port from dev/4.x branch)

v5.0.1

Bugfixes

  • Accurate typescript typings for onParsed, alterData, alterChildren (thanks @SPWizard01)

v5.0.0

Enhancements

  • New source prop which deprecates html and uri props. This prop supports method, body and headers fields 🚀
  • Brand new HTMLImage component which should be much better at adapting its size to available width. For this to happen, you must pass contentWidth prop. We recommend using useWindowDimensions().width to handle screen rotation gracefully. If you don't want your images to grow after a certain size, you could use computeEmbeddedMaxWidth. Read the RFC document “A Deterministic Approach to Embedded Content Scaling” for more details.
  • New prop computeEmbeddedMaxWidth (see usage above).
  • New prop contentWidth (see usage above).
  • New prop htmlParserOptions to override htmlparser2 ParserOptions object, thanks @fabianlee1211.
  • onLinkPress has now a default value: open links with Linking API (recommended).
  • Add Podspec file, thanks @systemride
  • New WebView optional prop for plugins which requires it, see @native-html/plugins, thanks @IjzerenHein
  • New defaultTextProps, thanks @Peretz30
  • New defaultWebViewProps for WebView-based plugins (tables, iframes...).
  • Export constructStyles, getParentsTagsRecursively, getClosestNodeParentByTag and IGNORED_TAGS from index.js.
  • New domNode field in passProps.
  • New domNodeToHTMLString util to get the HTML representation of a DOM node.
  • The internal pre-render tree structure is now typed (TransientNode) as well as onParsed.

Bugfixes

  • Image getting blur on iOS, #141;
  • img's tag resizeMode property not modifiable through tagStyles, #172;
  • imagesMaxWidth not working, #412

DEPRECATED PROPS (removed in v6)

  • allowFontScaling, use defaultTextProps.allowFontScaling instead;
  • textSelectable, use defaultTextProps.selectable instead;
  • decodeEntities, use htmlParserOptions.decodeEntities instead.
  • html, use source.html instead.
  • uri, use source.uri instead.

BREAKING CHANGES

  • (TypeScript users), requires minimum TypeScript version 3.5 (was 2.0)
  • iframe tag element is not rendered anymore, and react-native-webview has been removed from peer dependencies; use @native-html/iframe-plugin instead, which supports onLinkPress and scales to content width 🚀.
  • imagesMaxWidth and staticContentMaxWidth have been discontinued in favor of computeEmbeddedMaxWidth. This function takes the provided contentWidth as 1st argument, tag name as 2d argument and returns the max width of the embedded (iframe, image...).
  • In the passProps 4th argument of renderer functions, the field rawChildren has been renamed to transientChildren.

v4.2.5

Bugfixes

  • re-render HTML component on baseFontStyle updates

v4.2.4

Bugfixes

  • src attributes starting with "//" in img and iframe elements are not rendered (#408)

v4.2.3

Bugfixes

  • Rendered HTML with uri prop displays “undefined” (#256)
  • Custom wrapper ignored (#276), thanks @tomdaniel-it

Enhancements

  • HTML: use a proxy method setStateSafe to avoid updating while unmounted.

v4.2.2

Bugfixes

  • Translated elements bloated with HTML component props (#384, #383)
  • Unable to resolve stream module (#244)
  • textSelectable not working for tagName textwrapper (#193), thanks @brsaylor2
  • CSS font-family values ignored because of false positive match (#266)
  • CSS text-align unrecognized value (#252)
  • CSS inline rules with "none" values (#319)
  • CSS restrict display attribute to flex and none (#257)
  • Typos in IGNORED_TAGS arrays (#249, #272)
  • Re-render after classesStyles and tagsStyles updates (#343, #377), thanks @jorgemasta
  • Image size computed after HTMLImage component marked as mounted, thanks @laurynas

Enhancements

  • Replace deprecated references to RN PropTypes with loose types, thanks denissb
  • “Dumb” support for acronym tag, thanks Brainyoo
  • Stricter handling of CSS rules !important directives stripping

Miscellaneous

v4.2.1

Improvements

  • Add typescript definitions #341 (thanks @jsamr and to everyone that helped him !)

v4.2.0

⚠️ react-native-webview is now a peer dependency. As a result, you need to install it yourself. Please follow the plugin's instructions.


  • Fix deprecation warnings for componentWillReceiveProps, ...WillUpdate (thanks @peacechen)
  • Fix crashes with <iframe> tag (thanks @Ryabchikus)
  • Upgraded demo app to RN 0.59.10 (fixes build issues on XCode 11) (thanks @IjzerenHein)
  • Use baseFontSize for <a> tags

v4.1.1

Important note

⚠️ As of this release, react-native-render-html is now compatible with RN < 0.58 once again. Feel free to upgrade from 3.10.0 to 4.1.1 regardless of your RN version. ⚠️

Bugfixes

  • Prevent crash when encountering css functions like style="calc(100% - 20px);"
  • Prevent crash when encountering normal and unset keys

v4.1.0

Features

  • Add a default renderer for <pre>. This lets you display preformatted text such as code inside your content with a monospace font. #196
  • Add allowFontScaling prop. #157 (thanks @amhinson !)
  • Support srcdoc in <iframe> tags. #148 (thanks @charpeni !)

Bugfixes

  • Properly display an error when fetching a remote content to display has failed. #199 (thanks @Alex123456780)
  • Fix the rendering of nested lists, like <ul> inside <ol> #173 (thanks @muhamad-rizki)
  • Don't update HTMLImage's state after it's been unmounted. This prevents warnings during development. 4fca299
  • Don't strip line breaks in <pre> tags #196 (thanks @henry40408 !)

Miscellaneous

  • Remove useless stream dependency from package.json #190 (thanks @ramuse !)
  • Fix typo in the documentation #205 (thanks @ajmeese7 !)

v4.0.0

⚠️ This version requires react-native 0.58 and up. If you're using an older version, please stick to the version 3 of this plugin. ⚠️

Bugfixes

  • Prevent crash on react-native 0.58 and above since ViewStylePropTypes and ImageStylesPropTypes have been deprecated. (thanks @ChrisEdson !)

v3.10.0

Features

  • Add renderersProps prop. This lets you pass a set of props to your custom renderers, allowing you to style them furthermore without duplicating the renderers code. For instance, if you create a blockquote custom renderer, you can alter its color depending on the data you're rendering.

Example :

<HTML source={...} renderers={renderers} renderersProps={{ color: 'blue' } />
<HTML source={...} renderers={renderers} renderersProps={{ color: 'red' } />

const renderers = {
    blockquote: (htmlAttribs, children, convertedCSSStyles, passProps) => {
        const { renderersProps } = passProps;
        // rendersProps : { color: blue/red }

        return ...
    }
}

Rework

  • The logic that applies text styling has been rewritten from scratch. The previous implementation had a lot of flaws that were hard to debug. This should be a much needed improvement addressing some of the oldest issues of this plugin. The new algorithm is explained here.

⚠️ Although this shouldn't be a breaking change, your current rendering might be taking into account the previous buggy implementation. Upgrading to 3.10.0 might break some of your advanced text styling, just because it's now working as it should have from the beginning. ⚠️

Bugfixes

  • Is some cases, text nodes used to be wrapped in additional <p> tags. This could have unintended style effects. Let's now wrap them in a new custom tag that behaves like an inline tag, but without styling : textwrapper

v3.9.2

Miscellaneous

  • Minor fix with the npm release, no code change from the previous version.

v3.9.1

Features

  • Handle absolute font sizes : medium, xx-small, small... (thanks @ikhsanalatsary) Closes #122
  • Add ptSize prop (thanks @ikhsanalatsary)
  • Improve <iframe> rendering, letting you set their dimensions through tagsStyles & classesStyles. These are overriden by height and width html attributes. Closes #110

Bugfixes

  • Addresses issues when fontWeight property mistakenly got converted from string to a number. This resulted in crashes due to the wrong type. (thanks @mchudy !) Closes #111
  • Prevent a crash when rendering an <img> if you happen to have a style on your HTML container that's not an array (thanks @ikhsanalatsary) Closes #120
  • Remove !important annotations that prevented some styles from being rendered Closes #121

Miscellaneous

  • Fix typos & baseFontStyle value in README (thanks @charpeni) Closes #116
  • staticContentMaxWidth and imagesMaxWidth now have Dimensions.get('window').width as their default values

v3.9.0

Features

  • Add staticContentMaxWidth prop, letting you set a maximal width for "non-responsive" renderers (only <iframe> for now)
  • All attributes are now passed in onLinkPress : evt, href, htmlAttribs (thanks @barbogast !)
  • Add allowedStyles prop, excluding everything but these ones (thanks @krystofcelba !)

v3.8.1

Bugfixes

  • Properly merge baseFontStyle and default text styles, fixes #96

v3.8.0

Features

  • Add getClosestNodeParentByTag to the available utils functions
  • Add textSelectable prop (thanks @hyb175 !)

    On iOS, you can copy the text, but not actually select what you want. This is a bug from react-native, see facebook/react-native#13938

  • Add default renderer for <s> (thanks @hyb175 !)

Bugfixes

  • The component should now re-render accordingly to your props updates ! Fixes #89, closes #83 as well as many other related issues

    This is very important, especially if you need to update your rendering after it’s been displayed, or simply if you want to use hot reloading.

  • inherit styles won't crash the rendering anymore, fixes #87

Improvements

  • ignoredStyles prop will now also remove styling passed directly through HTML attributes, see #86

Miscellaneous

  • Removed lodash.isequal dependency
  • Rename iOS demo app with a more recognizable name

v3.7.0

Features

  • You can now alter the RNElements (basically the representation of your DOM elements into native components) with the onParsed prop, letting you customize even more your content.

Bugfixes

  • Add missing parentTag to elements, fixing an important regression where your tagsStyles may not be applied. (thanks @Krizzu !)

Miscellaneous

  • Updated the demo with the latest version of react-native and its dependencies.

v3.6.0

New features

  • Add alterNode prop that lets you change the values parsed from your HTML before it's rendered. It's extremely powerful as a last resort to add some very specific styling or circumvent rendering problems.
  • You can now set your custom renderers as inline components. By default, your renderers will still behave as blocks.

Fixes

  • <ul> and <ol> styles aren't hardcoded anymore, you can now style them normally. (thanks @jonathonlui !)
  • <a> tags will properly use your ignoredStyles prop (thanks @YeatsLu !)

v3.5.1

  • Fix : prevent crash with specific styling. This happens when the renderer is applying text-specific styles from a View wrapper to its Text children.

v3.5.0

New features

  • Add baseFontStyle prop, (replacing baseFontSize !) allowing you to provide complete default styling to your text elements (#25)
  • Add listsPrefixesRenderers prop, allowing you to customize the bullets and numbers rendered in your <ul> and <ol> lists
  • Add imagesInitialDimensions prop
  • Finished writing the base code for loading and parsing remote websites. Added a basic loader and error handlers.
  • Add remoteLoadingView & remoteErrorView props
  • Add onParsed prop, this is fired upon first rendering with the the parsing result of htmlparser2 and of this module
  • HTMLImage: render the alt attribute when images couldn't be displayed
  • HTMLImage: width and height attribute now resize your image
  • Add debug prop, printing the parsing result of htmlparser2 and of this module after initial rendering

Fixes

  • Make classesStyles take precedence over tagsStyles (#35)
  • Greatly improve text styling nested inside views
  • In some cases, raw texts children weren't wrapped with their texts siblings, so their styling wouldn't apply properly
  • Title tags like <h1>, <h2> and so on will always break line between each others
  • HTMLImage: don't overscale images when imagesMaxWidth prop is set to a higher value than the original width of your images
  • Correct some edge cases where random line breaks would randomly happen
  • Properly render raw texts nested inside <a> tags
  • tagsStyles is now applied _constructStyles so your custom renderers have proper styling

v3.4.0

New features

  • Add alterData & alterChildren props, allowing you to change your HTML data before the intial rendering !

Fixes

  • Empty lists won't crash (thanks @peacechen !)
  • baseFontSize prop won't override the fontSize set by either : the style attribute, the tagsStyles and classesStyles prop

v3.3.0

New features

  • Add customWrapper prop

Fixes

  • Use ViewPropTypes to get rid of the deprecation warning

v3.2.0

New features

  • Add baseFontSize prop so you can change the size of all your texts in a single prop without having to style every text tag (thanks @peacechen !)

Fixes

  • Texts elements that are siblings of <br> tags should receive the styling of their parent properly
  • Line breaks in your HTML won't actually render line breaks in your native components, for instance :
<p>
  <b>Description</b><br />Some description...<br />
  Item 1, Item 2, Item 3,
</p>

Item 1, 2, and 3 will be on the same line, regardless of the line breaks of the snippet.

v3.1.0

New features

  • Add decodeEntities prop (true by default)

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

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

Compatibility with react-native 0.43.2+ (react 16)

v1.0.0

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