iOS/Android pure javascript react-native component that renders your HTML into 100% native views
BSD-2-CLAUSE License
Bot releases are visible (Hide)
Published by Exilz over 6 years ago
staticContentMaxWidth
prop, letting you set a maximal width for "non-responsive" renderers (only <iframe>
for now)onLinkPress
: evt
, href
, htmlAttribs
(thanks @barbogast !)allowedStyles
prop, excluding everything but these ones (thanks @krystofcelba !)Published by Exilz over 6 years ago
baseFontStyle
and default text styles, fixes #96Published by Exilz over 6 years ago
getClosestNodeParentByTag
to the available utils functionstextSelectable
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 https://github.com/facebook/react-native/issues/13938
<s>
(thanks @hyb175 !)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 #87ignoredStyles
prop will now also remove styling passed directly through HTML attributes, see #86lodash.isequal
dependencyPublished by Exilz almost 7 years ago
RNElements
(basically the representation of your DOM elements into native components) with the onParsed
prop, letting you customize even more your content.parentTag
to elements, fixing an important regression where your tagsStyles
may not be applied. (thanks @Krizzu !)react-native
and its dependencies.Published by Exilz almost 7 years ago
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.<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 !)Published by Exilz almost 7 years ago
Published by Exilz almost 7 years ago
baseFontStyle
prop, (replacing baseFontSize
!) allowing you to provide complete default styling to your text elements (#25)listsPrefixesRenderers
prop, allowing you to customize the bullets and numbers rendered in your <ul>
and <ol>
listsimagesInitialDimensions
propremoteLoadingView
& remoteErrorView
propsonParsed
prop, this is fired upon first rendering with the the parsing result of htmlparser2
and of this moduleHTMLImage
: render the alt
attribute when images couldn't be displayedHTMLImage
: width
and height
attribute now resize your imagedebug
prop, printing the parsing result of htmlparser2
and of this module after initial renderingclassesStyles
take precedence over tagsStyles
(#35)<h1>
, <h2>
and so on will always break line between each othersHTMLImage
: don't overscale images when imagesMaxWidth
prop is set to a higher value than the original width of your images<a>
tagstagsStyles
is now applied _constructStyles
so your custom renderers have proper stylingPublished by Exilz about 7 years ago
alterData
& alterChildren
props, allowing you to change your HTML data before the intial rendering !baseFontSize
prop won't override the fontSize
set by either : the style
attribute, the tagsStyles
and classesStyles
propPublished by Exilz about 7 years ago
customWrapper
propViewPropTypes
to get rid of the deprecation warningPublished by Exilz about 7 years ago
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 !)<br>
tags should receive the styling of their parent properly<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.
Published by Exilz about 7 years ago
decodeEntities
prop (true
by default)Published by Exilz about 7 years ago
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.
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.
em
sizing !ignoredTags
prop, you're now able to get rid of those nasty <script> or <blink>
(seriously ?) more easilyignoredStyles
prop. Want to make sure no background-color
is applied through the style
attribute ? You got it<iframes>
& <i>
tagsclassesStyles
prop to style your components with their respective HTML classesignoreNodesFunction
prop so you can ignore HTML tags very precisely<em>
, <i>
, <strong>
... even if they're not wrapped in a parent like <p>
<a>
should behave and receive taps properly<a>
tag without href
attributePublished by Exilz about 7 years ago
Courtesy @duyphambhtech :)
shallowCompare
and replace with PureComponent
<img>
tag has no src attribute<br>
tag<sub>
and <sup>
PropTypes
from prop-types
PropTypes
validators directlyPublished by Exilz over 7 years ago
Compatibility with react-native 0.43.2+ (react 16)
Published by Exilz over 7 years ago
Initial release, usable with react >= 0.20 <= 0.42.2 (react 15)