首页 > 解决方案 > Twitter嵌入不渲染反应本机渲染html

问题描述

我正在使用 react-native-render-html@foundry

          <HTML
           contentWidth={Dimensions.get('screen').width}
           onLinkPress={(e,href)=>onShouldStartLoadWithRequest(e,href)}
           html={item.news.content.rendered}
           tagsStyles={ { p: { textAlign:'justify', fontSize:18, fontStyle: 'normal', color: !context.state.color?customcolor.black: customcolor.white ,fontFamily:customfonts.font} }}
           WebView={WebView}
           />

标签: androidreact-nativewebviewreact-native-render-html

解决方案


您需要为iframe标签添加自定义渲染器。幸运的是,有一个插件可以做到这一点:@native-html/iframe-plugin


推荐阅读