As a writing language, Markdown is much simpler than HTML. GitHub uses it for project display, StackOverflow also uses the Markdown editor and can also do blogs. Markdown can be converted to HTML by some means, thus increasing the style. It can be generated by compiling, or it can be displayed via JS on the web. This article involves three open-source JS libraries to edit and display markdown.
Markdown-js
Project Address: Https://github.com/evilstreak/markdown-js
How to use:
<! Doctype html> Rating: Use is relatively simple, but the displayed style uses the default style. You need to add a style yourself.
Strapdown.js
Project Address: http://strapdownjs.com/
How to use:
<! Doctype html> Rating:strapdown.js help you define the style of the page display, not directly embedded in your own page. It is more suitable to record content with Mardown.
Editer.md
Project Address: https://pandao.github.io/editor.md/examples/index.html
How to use:
<! doctype html> Rating:editer.md can do almost anything you can think of as something that can even help you generate flowcharts. Editer.md's own display style is also good. However, there are many project files and many dependencies. Unlike the previous two, there is only one JS file.
Markdown JS Library