Giter VIP home page Giter VIP logo

Comments (22)

kxxoling avatar kxxoling commented on May 29, 2024 5

I'm using react-native-html-render instead, but its document is bad, you can take my app as an example: https://github.com/kxxoling/PythonChina.app/blob/master/views%2FPost.js

from react-native-htmlview.

blackbing avatar blackbing commented on May 29, 2024 5

@jsdf I've send a pull request #18. Please help to review it.

from react-native-htmlview.

blackbing avatar blackbing commented on May 29, 2024 3

if you want to point to my version temporary before this issue resolved.
Try this
npm i git+https://[email protected]/blackbing/react-native-htmlview.git#master

from react-native-htmlview.

spetrey avatar spetrey commented on May 29, 2024

+1 that would be rad @jsdf

from react-native-htmlview.

sjoonk avatar sjoonk commented on May 29, 2024

+1 I hope so.

from react-native-htmlview.

chshouyu avatar chshouyu commented on May 29, 2024

+1024

from react-native-htmlview.

Kuchitama avatar Kuchitama commented on May 29, 2024

+1

from react-native-htmlview.

jsdf avatar jsdf commented on May 29, 2024

I'd happily accept a PR. This wouldn't be particularly difficult to implement, I just don't have time to do it any time soon.

from react-native-htmlview.

kxxoling avatar kxxoling commented on May 29, 2024

Really need this feature, but I don't know how to implement it. Poor knowledge with JS and iOS. :(

@jsdf If you have any idea but no time, how about writing it down and wait someone to implement it?

from react-native-htmlview.

ufon avatar ufon commented on May 29, 2024

+1

from react-native-htmlview.

ufon avatar ufon commented on May 29, 2024

I trying somsing but it not work :(

if (node.type == 'tag') {
        var linkPressHandler = null
        if (node.name == 'a' && node.attribs && node.attribs.href) {
          linkPressHandler = () => opts.linkHandler(entities.decodeHTML(node.attribs.href))
        }
        if (node.name == 'img' && node.attribs && node.attribs.src) {
          linkPressHandler = () => node.attribs.src
        }
        return (
          <Text key={index} onPress={linkPressHandler}>
            {node.name == 'pre' ? LINE_BREAK : null}
            {node.name == 'li' ? BULLET : null}
            {node.name == 'img' ? <Image style={height: 300} source={{uri: linkPressHandler}} /> : null}
            {domToElement(node.children, node)}
            {node.name == 'br' || node.name == 'li' ? LINE_BREAK : null}
            {node.name == 'p' && index < list.length-1 ? PARAGRAPH_BREAK : null}
            {node.name == 'h1' || node.name == 'h2' || node.name == 'h3' || node.name == 'h4' || node.name == 'h5' ? PARAGRAPH_BREAK : null}
          </Text>


          )

      }

from react-native-htmlview.

cinic2003 avatar cinic2003 commented on May 29, 2024

+1 hope it very much

from react-native-htmlview.

blankzust avatar blankzust commented on May 29, 2024

+1.

from react-native-htmlview.

ufon avatar ufon commented on May 29, 2024

@kxxoling i found this week ago. work's perfectly

from react-native-htmlview.

kxxoling avatar kxxoling commented on May 29, 2024

@ufon Except some compatibility with HTML5 tags. For example, if you put a img tag in an figure tag, the image won't show. I've created an issue about this, but not fixed yet.

from react-native-htmlview.

ufon avatar ufon commented on May 29, 2024

@kxxoling it's not so critical, I am sure this is remediable at a stage of response preparation :)

from react-native-htmlview.

kxxoling avatar kxxoling commented on May 29, 2024

@ufon Yeah, but I'm working on an app based on python-china.org's API, which prefer HTML5 tags.

from react-native-htmlview.

ladjzero avatar ladjzero commented on May 29, 2024

I'll try @blackbing 's approach.

from react-native-htmlview.

JO-WTF avatar JO-WTF commented on May 29, 2024

@kxxoling

Thanks a lot.

from react-native-htmlview.

JO-WTF avatar JO-WTF commented on May 29, 2024

@jsdf
Could you please merge @blackbing 's PR?

Thanks.

from react-native-htmlview.

melihmucuk avatar melihmucuk commented on May 29, 2024

@blackbing it doesn't work on React Native v0.30.

from react-native-htmlview.

vincentschen avatar vincentschen commented on May 29, 2024

+3 @liezl200 @allisonsun

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.