DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on • Originally published at polv.cc

Most Featureful Markdown Parser

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

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

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>
Enter fullscreen mode Exit fullscreen mode
<script>
alert('hello')
</script>
Enter fullscreen mode Exit fullscreen mode

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.

GitHub logo patarapolw / make-html

Make HTML from Markdown or Hyperpug

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

Live editor

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

You can save as PDF

See this post.

Top comments (0)