Releases: meliorence/react-native-render-html
Releases · meliorence/react-native-render-html
v5.0.0-alpha.6
Features
- New
defaultWebViewProps
forWebView
-based plugins (tables, iframes...).
Release 6.0.0-alpha.9
v5.0.0-alpha.5
Bugfixes
- More accurate types for
PassProps
(Typescript)
v5.0.0-alpha.4
Bugfixes
- Add missing exported types (Typescript)
v5.0.0-alpha.3
Enhancements
- New
source
prop which deprecateshtml
anduri
props. This prop supportsmethod
,body
andheaders
fields 🚀 - Brand new
HTMLImage
component which should be much better at adapting its size to available width. For this to happen, you must passcontentWidth
prop. We recommend usinguseWindowDimensions().width
to handle screen rotation gracefully. If you don't want your images to grow after a certain size, you could usecomputeEmbeddedMaxWidth
. Read the RFC document “A Deterministic Approach to Embedded Content Scaling” for more details. New propcomputeEmbeddedMaxWidth
(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 withLinking
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 - Export
constructStyles
,getParentsTagsRecursively
,getClosestNodeParentByTag
andIGNORED_TAGS
from index.js.
Bugfixes
- Image getting blur on iOS, #141;
img
's tagresizeMode
property not modifiable throughtagStyles
, #172;imagesMaxWidth
not working, #412
DEPRECATED PROPS (removed in v6)
allowFontScaling
, usedefaultTextProps.allowFontScaling
instead;textSelectable
, usedefaultTextProps.selectable
instead;decodeEntities
, usehtmlParserOptions.decodeEntities
instead.html
, usesource.html
instead.uri
, usesource.uri
instead.
BREAKING CHANGES
- (TypeScript users), requires minimum TypeScript version 3.5 (was 2.8)
iframe
tag element is not rendered anymore, andreact-native-webview
has
been removed from peer dependencies; use@native-html/iframe-plugin
instead, which supportsonLinkPress
and scales to content width 🚀.imagesMaxWidth
had been discontinued in favor ofcomputeEmbeddedMaxWidth
. This function takes the providedcontentWidth
as an argument, and returns the space the image should take.
Release 6.0.0-alpha.8
6.0.0-alpha.8 (2020-11-30)
Bug Fixes
- discard unsupported CSS inline methods (calc, var) (b722a78)
- prettier, consistant and scalable list rendering (af826a3)
- regression #172 (passing Image-specific styles to img component) (916d977)
- whitespace collapsing, collapse the penultimate child (TPhrasing) (223cef2)
- whitespace collapsing, handling of form feed characters (\n) (e5d20c6)
Features
- new renderChild prop to TChildrenRenderer (274355e)
Release 6.0.0-alpha.7
6.0.0-alpha.7 (2020-11-28)
Track progress: #434 (comment) and #430
Bug Fixes
- splitBoxModelStyle, avoid picking undefined props in style (e5f58bb)
BREAKING CHANGES
- the object returned by splitBoxModelStyle has more
legible field names, boxModelStyle and otherStyle.
Release 6.0.0-alpha.6
6.0.0-alpha.6 (2020-11-27)
Track progress: #434 (comment) and #430
Features
- polished API for extendDefaultRenderer (bb1fbeb)
BREAKING CHANGES
- extendRenderer has been renamed to
extendDefaultRenderer. Also note:- The first argument can be the name of the tag to extend;
- The second argument is now a partial model;
Release 6.0.0-alpha.5
6.0.0-alpha.5 (2020-11-27)
See #434 (comment) and #430
Bug Fixes
- inject textProps in TText renderers (5453f95)
Features
- support TText tnode in TNodeChildrenRenderer (00183cc)
Release 6.0.0-alpha.4
6.0.0-alpha.4 (2020-11-27)
See #434 (comment) and #430
Bug Fixes
- spread styles passed to TDefaultTextRenderer (d167f95)
Code Refactoring
- distinguish props from TDefaultRenderer and custom renderers (0f2c41d)
Features
- add new splitBoxModelStyle utility (3b0586c)
BREAKING CHANGES
- renderer props (and TDefaultRendererProps) don't pass
props to their underlying element. Instead, they passviewProps
if they
are view-based, andtextProps
if they are text-based. OnlyonPress
is
still directly passed to the underlying element. Finally, a third prop
is available,type
, useful for mixed renderers to know the type of the
underlying element (Text or View).