iOS/Android pure javascript react-native component that renders your HTML into 100% native views
BSD-2-CLAUSE License
Bot releases are hidden (Show)
Published by jsamr almost 4 years ago
See https://github.com/archriss/react-native-render-html/pull/434#issue-527747509 and https://github.com/archriss/react-native-render-html/issues/430
viewProps
if theytextProps
if they are text-based. Only onPress
istype
, useful for mixed renderers to know the type of thePublished by jsamr almost 4 years ago
See https://github.com/archriss/react-native-render-html/pull/434#issue-527747509 and https://github.com/archriss/react-native-render-html/issues/430
Published by jsamr almost 4 years ago
See https://github.com/archriss/react-native-render-html/pull/434#issue-527747509 and https://github.com/archriss/react-native-render-html/issues/430
Published by jsamr almost 4 years ago
Published by jsamr about 4 years ago
Published by jsamr about 4 years ago
HTMLImage
component which should be much better at adapting itscontentWidth
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 computeImagesMaxWidth
.computeImagesMaxWidth
(see usage above).contentWidth
(see usage above).img
's tag resizeMode
property not modifiable through tagStyles
, #172;imagesMaxWidth
not working, #412
imagesMaxWidth
had been discontinued in favor of computeImagesMaxWidth
.contentWidth
as an argument, and returnsPublished by jsamr about 4 years ago
HTML
: use a proxy method setStateSafe
to avoid updating while unmounted.Published by jsamr about 4 years ago
🚀 give us feedback here: https://github.com/archriss/react-native-render-html/issues/390
HTML
: use a proxy method setStateSafe
to avoid updating while unmounted.Published by jsamr about 4 years ago
textSelectable
not working for tagName textwrapper
(#193), thanks @brsaylor2
acronym
tag, thanks Brainyoo
Published by jsamr about 4 years ago
Published by Exilz over 4 years ago
Published by bd-arc almost 5 years ago
⚠️ react-native-webview
is now a peer dependency. As a result, you need to install it yourself. Please follow the plugin's instructions.
baseFontSize
for tagsPublished by Exilz over 5 years ago
stream
error (thanks @mlazari !)Published by Exilz over 5 years ago
⚠️ 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. ⚠️
style="calc(100% - 20px);"
normal
and unset
keysPublished by Exilz over 5 years ago
<pre>
. This lets you display preformatted text such as code inside your content with a monospace font. #196allowFontScaling
prop. #157 (thanks @amhinson !)srcdoc
in <iframe>
tags. #148 (thanks @charpeni !)<ul>
inside <ol>
#173 (thanks @muhamad-rizki)HTMLImage
's state after it's been unmounted. This prevents warnings during development. 4fca299<pre>
tags #196 (thanks @henry40408 !)stream
dependency from package.json
#190 (thanks @ramuse !)Published by Exilz over 5 years ago
ViewStylePropTypes
and ImageStylesPropTypes
have been deprecated. (thanks @ChrisEdson !)Published by Exilz over 6 years ago
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 html={...} renderers={renderers} renderersProps={{ color: 'blue' } />
<HTML html={...} renderers={renderers} renderersProps={{ color: 'red' } />
const renderers = {
blockquote: (htmlAttribs, children, convertedCSSStyles, passProps) => {
const { renderersProps } = passProps;
// rendersProps : { color: blue/red }
return ...
}
}
⚠️ 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. ⚠️
<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
Published by Exilz over 6 years ago
Published by Exilz over 6 years ago
ptSize
prop (thanks @ikhsanalatsary)<iframe>
rendering, letting you set their dimensions through tagsStyles
& classesStyles
. These are overriden by height
and width
html attributes. Closes #110fontWeight
property mistakenly got converted from string to a number. This resulted in crashes due to the wrong type. (thanks @mchudy !) Closes #111<img>
if you happen to have a style on your HTML container that's not an array (thanks @ikhsanalatsary) Closes #120!important
annotations that prevented some styles from being rendered Closes #121baseFontStyle
value in README (thanks @charpeni) Closes #116staticContentMaxWidth
and imagesMaxWidth
now have Dimensions.get('window').width
as their default values