Giter Club home page Giter Club logo

Comments (11)

CharlesMangwa avatar CharlesMangwa commented on July 30, 2024

Hi! As mentioned in the readme file: link is still WIP by now (see here). I've been quite busy these last couple of days, and didn't had the time to work on this RNSM. However I have an idea on how to solve this issue but feel free to leave a PR if you do to!

from react-native-simple-markdown.

linonetwo avatar linonetwo commented on July 30, 2024

OK, I'm glad to PR for link feature next week.

But image seems not working currently... Long way to go

          <Markdown styles={markDownStyle}>
            Some *really* basic **Markdown**.
            {'\n\n'}
            ![loli](http://img1.gtimg.com/comic/pics/hv1/171/204/2021/131467716.jpg)
          </Markdown>

from react-native-simple-markdown.

linonetwo avatar linonetwo commented on July 30, 2024

Can you share your idea about Link ?

there is a package but package it use is probably ios only.

from react-native-simple-markdown.

CharlesMangwa avatar CharlesMangwa commented on July 30, 2024

Well: I didn't encounter any major issue with Image, did you try with an https link as well?

from react-native-simple-markdown.

CharlesMangwa avatar CharlesMangwa commented on July 30, 2024

It's a pretty simple idea actually: wrap the link text into a <Text /> component and put it into a <TouchableWithouthFeedback /> with the link URL in the onPress prop.
If this works, we should be able to stylize the link (by passing style for the <Text /> component) and link will work on both iOS & Android (thanks to <TouchableWithouthFeedback />).
It's just that I don't have enough time to try this at the moment.

from react-native-simple-markdown.

linonetwo avatar linonetwo commented on July 30, 2024

Https image crashes my app too, it will show up 'Unfortunately, APP has stopped'

          <Markdown styles={markDownStyle}>
            Some *really* basic **Markdown**.
            {'\n\n'}
            ![loli](https://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Lolicon_Sample.png/1280px-Lolicon_Sample.png?1473001947598)
          </Markdown>

from react-native-simple-markdown.

CharlesMangwa avatar CharlesMangwa commented on July 30, 2024

Oh that's weird… I just ran your code and didn't encountered any issue or crash. Maybe your problem is somewhere else 😕 ?
screenshot 2016-09-04 a 17 25 00

from react-native-simple-markdown.

linonetwo avatar linonetwo commented on July 30, 2024

I'll try to figure it out, maybe it's due to Animation...

Thanks

from react-native-simple-markdown.

linonetwo avatar linonetwo commented on July 30, 2024

Now Link will pop up the native browser on a press.

I tried TouchableOpacity, but it will warning about 'unexpected view type nested under text node'. Can't figure out why so I use Text node with onPress directly. I think the difference between them is little: TouchableOpacity will become transparent when touched, Text doesn't.

If you care about this, I will spend more time on it trying to figure out, or I will working on more markdowns...

BTW: what's the difference between Autolink and Link?

from react-native-simple-markdown.

CharlesMangwa avatar CharlesMangwa commented on July 30, 2024

Hey! I'll check out your PR, thanks again !

Link is a normal link as you'd write it in MD whereas Autolink will parse your content and automatically generate a clickable element if you've just written : http://www.github.com/ for instance.

from react-native-simple-markdown.

CharlesMangwa avatar CharlesMangwa commented on July 30, 2024

Closing issue #3

from react-native-simple-markdown.

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.