react-native-markdown-renderer icon indicating copy to clipboard operation
react-native-markdown-renderer copied to clipboard

markdown-it-checkbox Integration

Open AugustoAleGon opened this issue 6 years ago • 1 comments
trafficstars

I am trying to use this plugin: https://github.com/mcecot/markdown-it-checkbox for the a checkbox in the messages. Somebody can give me some help. After I have installed the plugin and then declared the new markdown. How can I make it work?

AugustoAleGon avatar Feb 21 '19 21:02 AugustoAleGon

Just like that :

import Markdown from "react-native-markdown-renderer"
import markdownItCheckbox from "markdown-it-checkbox"

import MarkdownIt from "markdown-it"

const md = MarkdownIt().use(markdownItCheckbox)

const App = () => (
  <View style={styles.container}>
    <Markdown markdownit={md}>
      {copy}
    </Markdown>
  </View>
)

export default App

asurare avatar Feb 18 '20 10:02 asurare