Text 反应本机文本区域

Text 反应本机文本区域,text,react-native,Text,React Native,我试图在react native中显示文本(带有来自DB=>促销页面的html引号)。我必须在react native中显示不带html引号的文本,text和TextInput不起作用。有什么办法吗?为什么不使用字符串。替换('tag','')?我使用这个软件包 例如: var html = '<p>promotions page</p>' var styles = StyleSheet.create({p: { color: <color>}}) <

我试图在react native中显示文本(带有来自DB=>
促销页面的html引号)。我必须在react native中显示不带html引号的文本,
text
TextInput
不起作用。有什么办法吗?

为什么不使用
字符串。替换('tag','')

我使用这个软件包

例如:

var html = '<p>promotions page</p>'
var styles = StyleSheet.create({p: { color: <color>}}) 
<HTMLView
  value={html}
  stylesheet={styles}
/>
var html='促销页面

' var styles=StyleSheet.create({p:{color:}})
取决于您想要的显示方式?如果希望更好地保留格式,请在webview中渲染。或者,您需要解析html并将标记转换为适合您的应用程序样式的内容。我希望基于html格式进行查看,就像我的word with html标记树显示word以粗体显示,而不是以粗体标记显示一样