Markdown library question

Hello I have some questions about react-markdown library

now I’m doing Markdownpeviewer and met some issue
here is PrtSc of my project it’s working
but I want to get more friendly interface
Ass yo can see when I’m entering some code between back stick in the Editor
in the Previewer code change only font

Something like in this picture
var - is bold
require(‘react’) - has different colors and so on
background-color - has changed and code is in the frame
How I can to achieve it?
Dose it creating Markdown library?

Because I nothing found about it in the documentation

The markdown of three backticks (for code) does more than just a different font. It also makes sure that formatting like whitespace is retained (not compressed), that a monospace font is used so things line up, and escape sequences and codes are shown as is instead of interpreted.

As far as “var - is bold … require(‘react’) - has different colors and so on”, that is not markdown but is syntax highlighting. Afaik markdown.js does not support this. There are libraries like highlight.js that do this kind of thing, but I don’t know if it can or cannot be integrated with markdown.js.

This is of course beyond the requirements of the challenge. You may consider not worrying about syntax highlighting and just meet the specs so you can move on.

1 Like

Now I notice that there is a library called markdown-it that does offer a syntax highlighting option.

Thanks for suggestion
I’m going to try it in the project :slight_smile: