Giter Club home page Giter Club logo

Comments (3)

Exilz avatar Exilz commented on August 23, 2024

Hi,
all your CSS properties like line-height: inherit are transformed like so : { lineHeight: 'inherit' }.
Obviously, <Text> expects a number for this prop, hence the bug.

I don't have a solution that would prevent this crash for all cases yet. If you have control over the HTML you're displaying, just remove those inherit in your CSS.

If you don't, you can various props such as ignoredStyles, alterNode, alterChildren to make sure that won't happen again.

from react-native-render-html.

techrah avatar techrah commented on August 23, 2024

I'm getting a similar error and wondering why the various renderers are used. That is, if you're using a WebView why do you need to render some content with Text?

I have some fairly complicated HTML that was created by Word and it's going to be a challenge trying to figure out what to fix or ignore. This HTML may also be updated in the future; I have no control over that process.

from react-native-render-html.

nadav2051 avatar nadav2051 commented on August 23, 2024

Not sure why this issue has been closed - there is an issue on iOS where it crashes while trying to render html pasted from a Word editor or similar other editor, I get the same issue.

font-variant: normal on a div produces that error:
Error setting property 'fontVariant' of RCTText with tag #1483: JSON value 'normal' of type NSString cannot be converted to NSArray

letter-spacing: normal on a div produces that error:
Error setting property 'letterSpacing' of RCTText with tag #1483: JSON value 'normal' of type NSString cannot be converted to NSNumber

This only applies to iOS, I don't get the same experience in Android.

from react-native-render-html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.