markbody
v1.0.2
Published
parse the body of a webpage as markdown
Downloads
3
Maintainers
Readme
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/[email protected]/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