-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ const MyAwesomeApp = () => { | |
return ( | ||
<Markdown styles={styles}> | ||
#Markdown in react-native is so cool! | ||
|
||
You can **emphasize** what you want, or just _suggest it_ 😏… | ||
|
||
You can even [link your website](http://charlesmangwa.surge.sh) or if you prefer: [email sombedy](mailto:[email protected]) | ||
|
@@ -78,6 +78,29 @@ Example: | |
</Markdown> | ||
``` | ||
### `rules` | ||
The Markdown will apply its rules by default. However you can pass a `rules` prop to add your own. | ||
Exemple: | ||
```js | ||
<Markdown | ||
rules={{ | ||
image: { | ||
react: (node, output, state) => ( | ||
<MyOwnImageComponent | ||
key={state.key} | ||
source={{ uri: node.target }} | ||
/> | ||
), | ||
}, | ||
}} | ||
> | ||
![Alt text](/path/to/img.jpg) | ||
</Markdown> | ||
``` | ||
### Features | ||
- `br` (`<Text>`) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters