Open samdoj opened 7 years ago
@samdoj Could you please post some example/reproduction markdown?
i have the same issues。 api eg: https://cnodejs.org/api/v1/topic/592917b59e32cc84569a7458 md is in data's content
I am using Markdown view inside a Text Element and it gives me the same error. I am using a plugin that truncates the text and adds 'Continue reading' . I am using Markdown inside it.
Code :
<View style={{flexDirection:'row',paddingBottom:5}}>
<ReadMore
numberOfLines={3}
renderTruncatedFooter={this._renderTruncatedFooter}
renderRevealedFooter={this._renderRevealedFooter}>
<Text style={[styles.userInfoText,commonStyles.semiBoldText,commonStyles.smallText]}>
<MarkdownView>{data}</MarkdownView>
</Text>
</ReadMore>
</View>
If i am giving the height and width the continue reading doesn't work properly.
Is there any way to render it using "rules" property. I am unable to get how to use the "rules" property.
@pandeyrohit51 You cannot have <MarkdownView>
appear inside a <Text>
element, this is a limitation of Android & RN, as Android's native TextView
does not support nesting. On iOS nesting of regular views in text views can be achieved by providing a fixed width and height to the nested view, however in order to remain cross-platform this is not something actively supported by react-native-markdown-view
.
Nonetheless, what you're attempting can be achieved without the <Text>
view. You can pass styles directly to <MarkdownView>
to style text how you'd like. The supported styles are contained in styles.js.
@Benjamin-Dobell I've just encountered this error when using indented bullet lists, e.g.:
Here's a list:
* Item 1
* Item 1.1
* Item 1.2
* Item 2
Considering the only repro case provided here is indented list, this is a duplicate of https://github.com/Benjamin-Dobell/react-native-markdown-view/issues/14.
Any update on this? It's crashing our app.
+1
This occurs when using bold, and that was a simple fix. I just added width and height as null, but I meet this error when trying to display a list of links.