我正在尝试在本机中显示文本(带有来自DB =&gt; <p>promotions page</p>
的html引号)。我必须在反应原生中显示此文本时没有html引号,Text
和TextInput
不起作用。有什么办法吗?
答案 0 :(得分:0)
为什么不使用String.replace('tag', '')
?
答案 1 :(得分:0)
我使用此包https://github.com/jsdf/react-native-htmlview
示例:
var html = '<p>promotions page</p>'
var styles = StyleSheet.create({p: { color: <color>}})
<HTMLView
value={html}
stylesheet={styles}
/>