Releases: meliorence/react-native-render-html
Releases · meliorence/react-native-render-html
v3.8.1
v3.8.0
Features
- Add
getClosestNodeParentByTagto the available utils functions - Add
textSelectableprop (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.
inheritstyles won't crash the rendering anymore, fixes #87
Improvements
ignoredStylesprop will now also remove styling passed directly through HTML attributes, see #86
Miscellaneous
- Removed
lodash.isequaldependency - 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 theonParsedprop, letting you customize even more your content.
Bugfixes
- Add missing
parentTagto elements, fixing an important regression where yourtagsStylesmay not be applied. (thanks @krizzu !)
Miscellaneous
- Updated the demo with the latest version of
react-nativeand its dependencies.
v3.6.0
New features
- Add
alterNodeprop 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 yourignoredStylesprop (thanks @YeatsLu !)
v3.5.1
v3.5.0
New features
- Add
baseFontStyleprop, (replacingbaseFontSize!) allowing you to provide complete default styling to your text elements (#25) - Add
listsPrefixesRenderersprop, allowing you to customize the bullets and numbers rendered in your<ul>and<ol>lists - Add
imagesInitialDimensionsprop - Finished writing the base code for loading and parsing remote websites. Added a basic loader and error handlers.
- Add
remoteLoadingView&remoteErrorViewprops - Add
onParsedprop, this is fired upon first rendering with the the parsing result ofhtmlparser2and of this module HTMLImage: render thealtattribute when images couldn't be displayedHTMLImage:widthandheightattribute now resize your image- Add
debugprop, printing the parsing result ofhtmlparser2and of this module after initial rendering
Fixes
- Make
classesStylestake 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 whenimagesMaxWidthprop 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 tagsStylesis now applied_constructStylesso your custom renderers have proper styling
v3.4.0
New features
- Add
alterData&alterChildrenprops, allowing you to change your HTML data before the intial rendering !
Fixes
- Empty lists won't crash (thanks @peacechen !)
baseFontSizeprop won't override thefontSizeset by either : thestyleattribute, thetagsStylesandclassesStylesprop
v3.3.0
v3.2.0
New features
- Add
baseFontSizeprop 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.
