1.0.2 • Published 7 years ago

markbody v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Parse the body of a webpage as markdown and replace it with the result...

  • easy peasy lemon squeezy
  • uses default settings of marked
  • highlights code blocks with highlight.js

Usage

<!doctype html>
<html>
<head>
    <title>markbody</title>
    <script>
        window.markbody = {
          //query selector or element, defaults to document.body
          root: '#root',
          //your own options for `marked` here (override, not merged)
          marked: {}
        }
    </script>
    <script src="https://unpkg.com/markbody@1.0.2/dist/markbody.min.js"></script>
</head>
<body>
    # header1
    ## header2
    ```js
    var spongebob = 'squarepants'
    // comment
    ```
</body>
</html>

Contributing

All pull requests and issues welcome!

If you're not sure how, check out the great video tutorials on egghead.io!

License

MIT © Sam Gluck