Pacharapol Withayasakpunt Pacharapol Withayasakpunt
Mon, March 15, 2021

Most Featureful Markdown Parser

My favorite implementation is Markdown Preview Enhanced, to be exact, @shd101wyy/mume, but I want a little more features…

https://github.com/shd101wyy/mume

Another one that I love, is Discourse's (forum).

https://www.discourse.org/

Not only HTML, but also CSS (preprocessor) and JS enabled

I know there are security concerns, but you write your own text; so why care?

<style>
h2 {
  color: red;
}
</style>
<script>
alert('hello')
</script>

Isolated CSS styling, and reusable components

With the power of Shadow DOM, CSS is not penetrated to the outside. (But JavaScript still do.)

It is used in WebComponents, and I made one too.

Web enabled, with server-side enhancements

I made an online playground, here. It is made from pasting bare URL - https://github.com/patarapolw/make-html.

https://github.com/patarapolw/make-html

However, when it is online, you need to care about security. (And avoid XSS injection, for example.)

https://www.polv.cc/post/2020/04/secure-youtube-iframe-markdown

Live editor

If you have slow-to-render components, or reactive with JavaScript; like IFrame; you can prevent flickering with incremental DOM.

https://dev.to/patarapolw/how-to-prevent-flickering-in-live-markdown-editor-1pd1

You can save as PDF

See this post.

https://www.polv.cc/post/2020/11/markdown-to-pdf-missing-pieces