react-native-markdown-display
react-native-markdown-display copied to clipboard
Custom rules
Am i able to add custom rules?
const rules = {
video: (node, children, parent, styles) => {
const { src } = node.attributes;
console.log("node", node);
return (
<View
key={node.key}
style={{
height: 210,
marginBottom: 20,
}}>
<Text type="h5Bold" style={{ marginBottom: 10 }}>
teste
</Text>
<YoutubePlayer height={210} videoId={"FfCp4t6jiyc"} />
</View>
);
},
};
if yes, how can i use it? what is the markdown example?