我正在使用 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}
/>
答案 0 :(得分:0)
您需要为 JSchemaPreloadedResolver resolver = new JSchemaPreloadedResolver();
resolver.Add(new Uri("http://redfish.dmtf.org/schemas/v1/Manager.json"), File.ReadAllText(@"c:\redfish-json-schema\Manager.json"));
// the external ref will use the preloaded schema
// Failure happens here!
JSchema schema = JSchema.Parse(File.ReadAllText(@"c:\redfish-json-schema\Manager.json"), resolver);
JToken json = JToken.Parse(@"JsonFiles\json2.json");
IList<string> errorMessages;
bool isValid = json.IsValid(schema, out errorMessages);
标签添加自定义渲染器。幸运的是,有一个专门用于此的插件:@native-html/iframe-plugin