Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work. Learn more →
Top 10 JavaScript Commonmark Projects
-
In the following example, we have a user profile component that renders a list of the user's skills. Each skill has a name and a description. The description is served as markdown and we need to parse it to HTML before we render it. We can do this with a markdown parser (marked, in this case) and use dangerouslySetInnerHTML to inject the HTML into a
-
markdown-it
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
Maybe Markdown It? link
-
Appwrite
Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
-
Django-mdeditor is Markdown Editor plugin application for django base on Editor.md.
-
I've been trying to put together a blog for myself and a point comes when one needs to start thinking about strategies to store the blogs somewhere. One common strategy you find in a lot of tutorials is using some third-party library that parses markdown to the desired semantic, for eg. react-markdown . Now, speaking of the goods of such a library, it (hopefully) tackles the security concerns that come with letting external HTML render on a site. This is the security concern that leads to dangerous function names such as dangerouslySetInnerHTML, quoting the react docs , just " to remind yourself that it’s dangerous " . On a serious note, XSS attacks can be a major pain in the posterior. Apart from that, such libraries also eliminate the need to implement your own markdown parser.
-
remark
remark is a popular tool that transforms markdown with plugins. These plugins can inspect and change your markup. You can use remark on the server, the client, CLIs, deno, etc. (by remarkjs)
contentlayer uses remark to parse the markdown in an mdast. We can now use remark plugins to modify the mdast. Then rehype comes into play and converts the mdast into a hast. rehype plugins can now modify the hast. Finally the hast is converted into react components.
-
remarkable
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
-
The markdownlint VS Code extension is powered by the Node library of the same name. Its usage is quite similar to ESLint. It has a set of rules that can be configured, errors are highlighted, and you can automatically fix simple errors.
-
Sonar
Write Clean JavaScript Code. Always.. Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
-
Project mention: What software do you use to make documents without resorting to Microsoft word? | reddit.com/r/suckless | 2023-01-30
It probably won't cover needs of "make documents at our office" but I'd like to mention https://github.com/susam/texme. Basically you prepend your markdown file with a line of HTML/Javascript, rename it to HTML and it'll render pretty in a webbrowser.
-
micromark
the smallest commonmark (optionally gfm) compliant markdown parser that exists; new foundation for @unifiedjs (hundreds of projects w/ billions of downloads for dealing w/ content)
Project mention: I'm a little confused on how to handle blog posts and blog post snippets | reddit.com/r/webdev | 2023-01-17You mean when fetching the data on the client, you don't want it to come along with the styling? Is it in a tag?
I just want to wrap my head around the problem more properly, and what you're trying to solve
Also, if the blog post data was created with styling in the first place then what's the purpose for removing the styling? The only reason I can imagine is that the same blog post data would be used for two different purposes, one needing the styled version while the other would need the unstyled version. Otherwise, if the data is only ever going to be used without styles, I would just make sure they're added without styles in the first
Also, if you want to store markdown instead of html in the database, you can parse it into HTML on the client using a library like micromark (https://github.com/micromark/micromark) or similar
-
JavaScript Commonmark related posts
- What software do you use to make documents without resorting to Microsoft word?
- I'm a little confused on how to handle blog posts and blog post snippets
- How to convert markdown to json in react js
- My Journey into Open Source
- Rendering Markdown with Enhance
- DPS909 Blog - Lab 6: Full MD Support
- In a React App, where do you put the strings that will be rendered? (The content, the quotes, etc)?
-
A note from our sponsor - Sonar
www.sonarsource.com | 4 Feb 2023
Index
What are some of the best open-source Commonmark projects in JavaScript? This list will help you:
Project | Stars | |
---|---|---|
1 | marked | 29,007 |
2 | markdown-it | 14,789 |
3 | editor.md | 12,758 |
4 | react-markdown | 9,839 |
5 | remark | 5,950 |
6 | remarkable | 5,465 |
7 | markdownlint | 3,581 |
8 | texme | 2,133 |
9 | micromark | 1,367 |
10 | muboard | 542 |