Releases: meliorence/react-native-render-html
Releases · meliorence/react-native-render-html
v3.8.1
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 theonParsed
prop, letting you customize even more your content.
Bugfixes
- Add missing
parentTag
to elements, fixing an important regression where yourtagsStyles
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 yourignoredStyles
prop (thanks @YeatsLu !)
v3.5.1
v3.5.0
New features
- Add
baseFontStyle
prop, (replacingbaseFontSize
!) 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 ofhtmlparser2
and of this module HTMLImage
: render thealt
attribute when images couldn't be displayedHTMLImage
:width
andheight
attribute now resize your image- Add
debug
prop, printing the parsing result ofhtmlparser2
and of this module after initial rendering
Fixes
- Make
classesStyles
take precedence overtagsStyles
(#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 whenimagesMaxWidth
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 thefontSize
set by either : thestyle
attribute, thetagsStyles
andclassesStyles
prop
v3.3.0
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.