Releases: native-html/plugins
Releases · native-html/plugins
@native-html/iframe-plugin@1.1.2
@native-html/table-plugin@4.0.0
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: -
extractHtmlTableProps
has been dropped in favor of
useHtmlTableProps
hook for reusability.
IGNORED_TAGS
is not exported anymore, and not necessary.- requires
react-native
0.63.x and above - new
tableModel
export for the new custom renderers API
@native-html/iframe-plugin@2.0.0
2.0.0 (2021-02-06)
Features
- iframe-plugin: support react-native-render-html 6.x (11a8ca0)
BREAKING CHANGES
- iframe-plugin: -
extractHtmlIframeProps
has been dropped in favor of
useHtmlIframeProps
hook for reusability.
- requires
react-native
0.63.x and above - new
iframeModel
export for the new custom renderers API
@native-html/table-plugin@3.1.0
@native-html/table-plugin@3.0.1
@native-html/table-plugin@3.0.0
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
tagsStyles
andclassesStyles
when matched
BREAKING CHANGES
- table-plugin:
makeTableRenderer
andmakeCustomTableRenderer
have been dropped in favor of the defaulttable
renderer export andextractHtmlTableProp
function for custom renderers. This release takes advantage of the availability ofdomNode
in custom renderers and the newdomNodeToHTMLString
utility available in react-native-render-html. Configuration for the table renderer is now read from
renderersProps.table
prop of theHTML
component.
@native-html/iframe-plugin@1.1.1
@native-html/iframe-plugin@1.1.0
@native-html/iframe-plugin@1.0.0
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
tagsStyles
andclassesStyles
styles when matched - iframe-plugin: compliance with React Native Render HTML RFC001: use
computeEmbeddedMaxWidth
to constrain max width for iframes