What is md.js?
Why should I use md.js?
A side-effect is that you can write beautiful websites using Markdown.
And what happens if I use it?
Using md.js has a few effects:
- a user browsing your website with a non-JS browser thinks something like
Hey, they take care of my browser. I like them!
Note that people using either links, lynx, NoScript or NotScript are usually people who can read Markdown.
- you can write a website quite quick and easy
- you do not need to worry about HTML anymore
- the sites get more small due to the missing HTML overhead
The scripts are quite small if minified so if you have much HTML it might be worth a try. This is because the HTML is generated client-side.
- the client's browser will need to parse and convert the Markdown
Not a great disadvantage due to the fact that the rendering is way more CPU-intensive.
More information on everything can be found in the demo.
So you got me, how do I use it?
Just include the needed files (
md.js) and create
pre tag and set it's class to
The complete tag with all attributes will be replaced by a plain
div, so be
Do you hav.…
Yes we have an example, it resides on the
gh-pages branch, also hosted
- works great with bootstrap
- AJAX is possible (if
loadMarkdown()is called) but should not be used