Benjamin-Dobell / react-native-markdown-view

MarkdownView for React Native
MIT License
190 stars 77 forks source link

displaying image causing an error on android #18

Open yernandus opened 6 years ago

yernandus commented 6 years ago
screen shot 2018-01-17 at 16 22 15
martsie commented 6 years ago

Having same issue, it looks like this library might have issues displaying custom components and images in markdown on Android. Android only supports text in text components.

martsie commented 6 years ago

You can get around this by adding the following to your markdown rules:

paragraph: {
            render: (node, output, state, styles) => {
              return (
                <View key={state.key} style={styles.container}>
                  {output(node.content, state)}
                </View>
              );
            },           
          },

Who knows what this may break for you but at least it's a place to start!