markbody

1.0.2 • Public • Published

markbody

Parse a webpage as markdown

Made with ❤ at @outlandish

npm version


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

Package Sidebar

Install

npm i markbody

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • sdgluck