Closed azuddin closed 5 years ago
Nvm, just found the solutions.
import { alterNode as alterNodeTable } from "react-native-render-html-table-bridge";
<HTML alterNode={node => {
const { name, parent } = node;
alterNodeTable(node);
if (name === "img") {
node.attribs = {
...(node.attribs || {}),
style: `height:"auto";`
};
return node;
}
}}/>
having difficulties on how to add additional condition to alterNode function without overriding it. other than manually updating the package, is there any way to do it? i wanted to add these to alterNode function
if (node.name === "img") { node.attribs = { ...(node.attribs || {}), style:
height:"auto";
}; }