react-native-htmlview
react-native-htmlview copied to clipboard
Custom function to renderNode
Is there a way to inject custom function renderNode? My use case is that I am rendering an iframe node in renderNode but I would like to add a custom function so that I can record onPress.
function renderNode(node, index, siblings, parent, defaultRenderer) {
if (node.name === 'iframe') {
const a = node.attribs;
return (
<Video
src={a.src}
// revealVideo={???} <<---- I would like to pass a function to my own Video component
/>
);
}
}
const articleContent = props => {
return (
<HTMLView
value={ props.content }
stylesheet={styles}
renderNode={renderNode}
/>
);
}
Thanks.