Giter VIP home page Giter VIP logo

Comments (8)

rajnikantsethiya avatar rajnikantsethiya commented on June 1, 2024 3

Thanks for the reply @stefan-digital-chefs ...
But the solution is not working its not changing the colours for anything.:(

from react-native-htmlview.

Stefan-vs avatar Stefan-vs commented on June 1, 2024 2

Weird. This works for me, just putting an element around the content string. Like this:
<HTMLView value={"<newCustomElement>"+subHeader+"</newCustomElement>"} stylesheet={webViewStyle} />}
And then provide a style for that element, like this:
const webViewStyle = StyleSheet.create({ newCustomElement: { color:"red" } });

from react-native-htmlview.

Stefan-vs avatar Stefan-vs commented on June 1, 2024 1

Just do something like this:

<HTMLView value={"<styledText>"+subHeader+"</styledText>"} stylesheet={webViewStyle} />}

and

const webViewStyle = StyleSheet.create({ styledText: { color:"red" } });

from react-native-htmlview.

rajnikantsethiya avatar rajnikantsethiya commented on June 1, 2024

how to style text in Htmlview, default styling !!!!!
Any solution or alternative to render HTML in react native?

from react-native-htmlview.

neb-b avatar neb-b commented on June 1, 2024

Any update on this? Using <styledText> doesn't work for me. I'm wrapping my text in a <p> and trying to update the color for that doesn't work either.

from react-native-htmlview.

neb-b avatar neb-b commented on June 1, 2024

Ahh, working good for me now. I wasn't passing in the stylesheet correctly.

Thanks for the help.

from react-native-htmlview.

richchurcher avatar richchurcher commented on June 1, 2024

Props can now be passed to the Text component via textComponentProps: see updated docs for details. This includes passing the style prop :)

from react-native-htmlview.

nitinnavik avatar nitinnavik commented on June 1, 2024

what happen if value is normal text and we want to apply style for the same text .
eg -
value = 'The Life of Python,TEST'
we can appy style to b tag but how we can apply style to all the text even it not wrap with any html tag

from react-native-htmlview.

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.