Giter VIP home page Giter VIP logo

Comments (6)

Exilz avatar Exilz commented on May 13, 2024

from react-native-render-html.

 avatar commented on May 13, 2024

@Exilz Hahaha, fair enough, thanks. Yes, I have started reading the source code. I'm checking out how easy it is to implement. If I have the time, I'll definitely submit a PR for this. Thank you again!

from react-native-render-html.

Exilz avatar Exilz commented on May 13, 2024

Hi @johncrisostomo,
I'm currently working on this feature right now as I found out in one of our apps that this is actually a very critical feature to add.

The problem is that with nested texts, if your lovely contributors feed you something like

<strong><p>This is a text</p></strong>

instead of

<p><strong>This is a text</strong></p>

Your text won't be in bold if you supplied a <p> style in your tagsStyles prop.

This is because since the <p> is the deepest tag, its style will be the last to be applied.

The solution to this problem, rather than fiddling with the renderer and moving around the styles is this new baseFontStyle prop that would replace your typical <p> style.

Here is the WIP commit on the development branch. I'd love it if you could take a look at it and tell me what you think.

from react-native-render-html.

Exilz avatar Exilz commented on May 13, 2024

This landed in 3.5.0-rc.1. Since this release is quite important, testing would be appreciated !

from react-native-render-html.

 avatar commented on May 13, 2024

@Exilz Thanks so much for this! Sorry I have been busy the last few days, but will definitely test this out.

from react-native-render-html.

Exilz avatar Exilz commented on May 13, 2024

Looks like it's working properly. Please re-open an issue if it breaks something on your side.

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.