I am a newbie to web dev/react and i am using react to create the markdown previewer. I am usign a react component on github and it works fine in converting markdown to html.
Currently i am having issues with the last test to enable the line breaks . I noticed most people are using “marked.js” which allows them to use marked.setOptions. Will this be possible for me since i am using
Just realised i was cutoff, sorry!. I found a react library called so i used that instead of marked.js and it works. However, i am stuck when it comes to rendering carriage returns as .
@Layooo I tried using react-markdown and ran into this issue to. I implemented the fix as specified in the github issue and the newlines inserted s. HOWEVER, when I went to type into the editor, the editor would re-render and drop the cursor to the end of the editor, instead of continuing at the same spot(like a normal text editor).
I couldn’t figure how how to fix that, so I quit using react-markdown and switched to using marked. When I figured out how to used marked, typing in the editor worked fine as expected.
I hope this helps. Feel free to let me know if you have any questions! Also, feel free to checkout my project because I just finished it.