在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):mikeal/markdown-element开源软件地址(OpenSource Url):https://github.com/mikeal/markdown-element开源编程语言(OpenSource Language):JavaScript 86.6%开源软件介绍(OpenSource Introduction):Markdown ElementHTML 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> Attributes/propertiesThe following element properties can be used to change the render settings. They can be set either from JavaScript or from HTML.
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) RenderingThe rendered markdown is placed in a <mark-down>
<render>
<h1>h1</h1>
<ul>
<li>test</li>
</ul>
</render>
</mark-down> BundlingIf 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. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论