jk-markdown-it
v1.0.6
Published
markdown-it in JK
Downloads
2
Readme
jk-markdown-it
A Javascript Markdown to HTML converter.
Installation
npm install jk-markdown-it --save
Usage examples
引入 index.js
:
<div class="jk-markdown-it"></div>
import markdownIt from "jk-markdown-it";
import "jk-markdown-it/styles/markdown-it.css";
const html = markdownIt("## md");
const jkMarkdownIt = document.getElementsByClassName("jk-markdown-it")[0];
jkMarkdownIt.innerHTML = html;
引入 vue
组件:
<markdown-it :md="value"></markdown-it>
import MarkdownIt from "jk-markdown-it/MarkdownIt.vue";
export default {
components: {
MarkdownIt
},
data() {
return {
value: "## md"
};
}
};
Plugin list
- highlight.js
- markdown-it
- markdown-it-abbr
- markdown-it-container
- markdown-it-deflist
- markdown-it-emoji
- markdown-it-footnote
- markdown-it-ins
- markdown-it-katex
- markdown-it-mark
- markdown-it-sub
- markdown-it-sup
- markdown-it-task-lists
License
Copyright (c) 2020-present zhuhuajian