On initial load render markdown, and get markdown on type end. #471
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
On initial load, converting markdown to html and then set the value worked for me. After the user finish typing, converting html back to markdown worked for me. However, the library call 'marked' which converts markdown to html required a lot of tweaking to get the correct format. The library called 'turndown' did not work in react native, so i had to convert it myself. I am using tiptap for rich text editing in web which worked really well. In order to have the same behaviour in react native using react-native-enriched required a lot more efforts and might not have the perfect result due to markdown html conversion. I think built in markdown support just like how tiptap does it is still a good thing to have. |
Beta Was this translation helpful? Give feedback.

On initial load, converting markdown to html and then set the value worked for me.
After the user finish typing, converting html back to markdown worked for me.
However, the library call 'marked' which converts markdown to html required a lot of tweaking to get the correct format. The library called 'turndown' did not work in react native, so i had to convert it myself.
I am using tiptap for rich text editing in web which worked really well. In order to have the same behaviour in react native using react-native-enriched required a lot more efforts and might not have the perfect result due to markdown html conversion. I think built in markdown support just like how tiptap does it is still …