HTML Element for markdown content.
Usage:
<body>
<script src="https://cdn.jsdelivr.net/npm/markdown-element/dist/markdown-element.min.js"></script>
<mark-down>
## h2
* test
* test2
```javascript
let x = 'asdf'
class Text {
constructor() {
}
}
```
</mark-down>
</body>
The following element properties can be used to change the render settings. They can be set either from JavaScript or from HTML.
noGFM is true.noGFM is true.Examples:
<mark-down notables pedantic>
# h1
* test
</mark-down>
let marked = document.createElement('mark-down')
marked.noGFM = true
marked.smartyPants = true
document.body.appendChild(marked)
The rendered markdown is placed in a <render> element.
<mark-down>
<render>
<h1>h1</h1>
<ul>
<li>test</li>
</ul>
</render>
</mark-down>
If you want to build the component into the JavaScript bundle of your app you can do so easily, but you'll need to handle loading a WebComponents polyfill on your own.