Comments (16)
I gonna try!
PS. Does it work with PNG?
My data is:
<p><img src="https://appdopelo.tk/service/img/cms/logo_new_light.png" width="289" height="221" alt="logo_new_light.png" /></p>
"dependencies": {
"react": "~15.4.2",
"react-addons-shallow-compare": "^15.4.2",
"react-native": "^0.42.0",
"react-native-carousel-component": "^0.0.16",
"react-native-fence-html": "^1.0.6",
"react-native-html-converter": "^1.0.4",
"react-native-htmlview": "^0.5.0",
"react-native-scrollable-tab-view": "^0.6.0",
"react-native-tab-navigator": "^0.3.3",
"react-native-vector-icons": "^4.0.0",
},
console.log(carouselDescription); >>>
Object {$$typeof: Symbol(react.element), key: null, ref: null, props: Object, type: function…}
$$typeof
:Symbol(react.element)
key: null
props: Object
onError: function ()
onLinkPress: function openURL(url)
style:,Array(2)
stylesheet: Object
a: 58
actions: 60
container: 54
contentContainer: 59
description: 56
img: 57
title: 55
__proto__ : Object
value:"<p><img src="https://appdopelo.tk/service/img/cms/cms-img.jpg" alt="" width="370" height="192" /></p>↵<p><span><span class="label-tooltip" title="">Descrição completa</span>"
__proto__ :Object
ref: null
type: function (props, context, updater)
_owner: ReactCompositeComponentWrapper
_store: Object
_self : null
_source: null
__proto__: Object
Not working
from react-native-htmlview.
With width and height set, img tag rendering works for Android. However I'm still having the issue that the same image is not rendering on iOS (there is a blank space where the image should be).
EDIT: nevermind, it was an iOS issue with loading images over http. I configured App Transport Security differently in Info.plist. See here for more info
from react-native-htmlview.
In the version which I just released, this works:
<img src="https://i.redd.it/1l01wjsv22my.jpg" width="400" height="400" />
Not setting the dimensions may also work (but is experimental)
from react-native-htmlview.
had solve this issues ?
from react-native-htmlview.
React native support Image tag.
<Image
style={{width: 150, height: 150}}
source={{uri: imgUrl}}
/>
from react-native-htmlview.
Any update about supporting tag?
react-native version: 0.38
from react-native-htmlview.
does it support <img src="https://dz2cdn2.dzone.com/thumbnai.jpg" width="60">
tag ?
from react-native-htmlview.
i think it's not supported, yet
from react-native-htmlview.
no modules are supporting img tags... I'm trying hard and no success
from react-native-htmlview.
Can you tell us reasons it is hard, @MichelDiz?
from react-native-htmlview.
Well I have a REST API that the app consume the Json data. I create a serie of mapping, reducing and Loop to organize and share the amount of data. I use a Carousel Component from 'react-native-carousel-component' to show a card with the information passed through props.
something like API > props > datasource > cloneWithRows this.props.data > renderRow > onPress={() => { this.showCarouselManager(val); }} > description
showCarouselManager = (rowData, val) => {
const options = {
cards: this.cards2(rowData),
},
};
and so on
then I use some module like:
import HTML from 'react-native-fence-html'; Works only text the best so far
import HTML from 'react-native-html-converter'; No sucess even with text
import HTML from 'react-native-htmlview'; Works only text
import HTML from 'react-native-webview'; No sucess
import HTML from 'react-native-webview-android; No sucess
inside the react-native-Carousel-Component I edit the component CarouselCard.js
const carouselDescription = description ? (
<HTMLView
value={description}
stylesheet={styles.descriptionStyle}
style={[styles.description, descriptionStyle]}
/>
) : null;
from react-native-htmlview.
This package supports img tag but the width and height attributes must be set.
from react-native-htmlview.
Okay, but where? inside my Json.description has width="203" height="214" inside the HTML
from react-native-htmlview.
Not working for me with "onRenderNode": #94
from react-native-htmlview.
How are you setting the image dimensions on dynamic content, @liezl200?
from react-native-htmlview.
if we add img with relative path, could add one base URL ? then we could check if it is from web. if not. use base URL to load images.
from react-native-htmlview.
Related Issues (20)
- Unordered List followed by Paragraph not rendering properly HOT 3
- Space between html tags is huge even tho I wrapped my content in "<div>" HOT 4
- Inline styling is not working HOT 1
- Get text of clicked links
- How to set the number of lines to show HOT 1
- Truncate text in html view HOT 1
- Get raw html in renderNode HOT 2
- Make HTML Text selectable HOT 4
- Multiple HyperLinks
- img tag have default border HOT 1
- Update HTMLView TS definitions to support class components
- <sup> and <sub> tag not working HOT 3
- Typing for HTMLViewNode on Typescript HOT 2
- dynamically set height according to available content
- import ViewPropTypes from deprecated-react-native-prop-types instead of react-native HOT 5
- Is there a way to ignore links ? HOT 1
- Error: Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. HOT 3
- can add katex css to this html view ? HOT 1
- Please Help me to Solve this Error << ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. HOT 2
- ViewPropTypes will be removed from 'react-native' HOT 2
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-htmlview.