Improved HTML parsing
这个提交包含在:
父节点
82371e89e7
当前提交
b6915a1ebe
共有 1 个文件被更改,包括 11 次插入 和 1 次删除
|
@ -21,15 +21,25 @@ class CustomHTML extends React.Component<Props> {
|
|||
return <Text {...passProps}>{children}</Text>;
|
||||
};
|
||||
|
||||
getListBullet = (htmlAttribs, children, convertedCSSStyles, passProps) => {
|
||||
return (
|
||||
<Text>- </Text>
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
// Surround description with p to allow text styling if the description is not html
|
||||
return <HTML
|
||||
html={"<p>" + this.props.html + "</p>"}
|
||||
renderers={{
|
||||
p: this.getBasicText,
|
||||
li: this.getBasicText,
|
||||
}}
|
||||
listsPrefixesRenderers={{
|
||||
ul: this.getListBullet
|
||||
}}
|
||||
ignoredTags={['img']}
|
||||
ignoredStyles={['color', 'background-color']}
|
||||
|
||||
onLinkPress={this.openWebLink}/>;
|
||||
}
|
||||
}
|
||||
|
|
正在加载…
在新工单中引用