Releases: native-html/plugins
Releases · native-html/plugins
@native-html/[email protected]
@native-html/[email protected]
4.0.0 (2021-02-06)
Bug Fixes
- table-plugin: mark displayMode field as optional (b395a49)
Features
- table-plugin: support react-native-render-html 6.x (1526efe)
BREAKING CHANGES
- table-plugin: -
extractHtmlTablePropshas been dropped in favor of
useHtmlTablePropshook for reusability.
IGNORED_TAGSis not exported anymore, and not necessary.- requires
react-native0.63.x and above - new
tableModelexport for the new custom renderers API
@native-html/[email protected]
2.0.0 (2021-02-06)
Features
- iframe-plugin: support react-native-render-html 6.x (11a8ca0)
BREAKING CHANGES
- iframe-plugin: -
extractHtmlIframePropshas been dropped in favor of
useHtmlIframePropshook for reusability.
- requires
react-native0.63.x and above - new
iframeModelexport for the new custom renderers API
@native-html/[email protected]
@native-html/[email protected]
@native-html/[email protected]
This release requires react-native-render-html ≥ 5.0.0! Be aware, its API has changed a little:
import React from 'react';
import { ScrollView } from 'react-native';
import HTML from 'react-native-render-html';
import table, { IGNORED_TAGS } from '@native-html/table-plugin';
import WebView from 'react-native-webview';
const html = `
<table>
<tr>
<th>Entry Header 1</th>
<th>Entry Header 2</th>
</tr>
<tr>
<td>Entry First Line 1</td>
<td>Entry First Line 2</td>
</tr>
</table>
`;
const htmlProps = {
WebView,
renderers: {
table
},
ignoredTags: IGNORED_TAGS,
renderersProps: {
table: {
// Put the table config here (previously,
// the first argument of makeTableRenderer)
}
}
};
export const Example = () => (
<ScrollView>
<HTML source={{ html }} {...htmlProps} />
</ScrollView>
);Features
- table-plugin: new lightweight API for react-native-render-html v5.0 (a7fa70a)
- table-plugin: new displayMode prop and compliance with RFC001 (1de3df0)
- table-plugin: the component now inherits from
tagsStylesandclassesStyleswhen matched
BREAKING CHANGES
- table-plugin:
makeTableRendererandmakeCustomTableRendererhave been dropped in favor of the defaulttablerenderer export andextractHtmlTablePropfunction for custom renderers. This release takes advantage of the availability ofdomNodein custom renderers and the newdomNodeToHTMLStringutility available in react-native-render-html. Configuration for the table renderer is now read from
renderersProps.tableprop of theHTMLcomponent.
@native-html/[email protected]
@native-html/[email protected]
@native-html/[email protected]
1.0.0 (2020-12-05)
Here comes a brand new renderer for iframe, which has been extracted from react-native-render-html. It has a new powerful feature: scalesPageToFit (disabled by default) which will zoom-out just the right amount when the width of the iframe is greater than the available width on screen (as determined by HTML contentWidth prop.) In the screenshot below, scalesPageToFit is disabled (left), and enabled (right):
Features
- iframe-plugin: brand new iframe renderer (b08d56d)
- iframe-plugin: new scalesPageToFit config (8f5c030)
- iframe-plugin: the component inherits from
tagsStylesandclassesStylesstyles when matched - iframe-plugin: compliance with React Native Render HTML RFC001: use
computeEmbeddedMaxWidthto constrain max width for iframes
