tinymd 💃
Why
All other solutions were either too large to be used in webapps where bundle size is important or too constraint (like missing support for paragraphs or nested lists).
Tinymd tries to strike a good balance between size and features. It's fully tested and works in browsers as well as in Node.
The underlying parsing alorithm is heavily based on Vladimir Antonov's nano-markdown implementation.
Basic Usage
; const opts = {};const html = ;
Supported markdown syntax
# tinymd supports ... * lists - nested lists 1. ordered 2. with [links](http://example.com) - ![images](/cat.jpg) - rulers ---- All ~~common~~ **inline** _styles_ code blocks rulers And \[escaping]\(of special chars).
Options
Target _blank
By default all links starting with +
will get target="_blank"
attribute. You can customize this behavior by providing an isBlank
function:
Rewriting URLs
You can rewrite all links and image sources by providing a rewrite
function:
Adding headline anchors
;// <h1 id="hello_world">hello world</h1>
License
MIT