Comments (11)
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.
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.
Can you share your idea about Link ?
there is a package but package it use is probably ios only.
from react-native-simple-markdown.
Well: I didn't encounter any major issue with Image, did you try with an https link as well?
from react-native-simple-markdown.
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.
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.
Oh that's weird… I just ran your code and didn't encountered any issue or crash. Maybe your problem is somewhere else 😕 ?
from react-native-simple-markdown.
I'll try to figure it out, maybe it's due to Animation...
Thanks
from react-native-simple-markdown.
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.
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.
Closing issue #3
from react-native-simple-markdown.
Related Issues (20)
- Simple Markdown fails with `Unexpected view type nested under text node` HOT 7
- Single line break not working HOT 4
- is a way exists to use an anchors system ?
- Import markdown from a file ?
- Dependency (simple-markdown fork) not available in tagged versions HOT 2
- Link not clickable on IOS
- callback when the markdown is rendered
- Rendering problem after ". "
- Emojis are placed too low down
- Error: Nesting of View within Text is not supported HOT 2
- How can I set the default text size HOT 2
- Android error: Cannot add a yoga node to a parent without a measure function!
- How to get proper markdown with the list?
- Can't seem to center align text HOT 1
- New release that doesn't require git HOT 2
- Error in jest Cannot use import statement outside a module
- Setting text fontSize does nothing
- rules.js matching `heading X` instead of `headingX`
- Insert blank line? HOT 2
- allowFontScaling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-simple-markdown.