1.1.4 • Published 6 years ago
js-markdown-editor v1.1.4
js-markdown-editor
基于 marked 的 markdown 编辑器,支持导入导出,可独立使用亦可内部引入
Online
Install
# CDN
<script src="https://wxf1.oss-cn-hangzhou.aliyuncs.com/js-markdown-editor.js"></script>
# NPM
npm i js-markdown-editor
Setup
# in <script>
WXFEditor(elementID)
# in module
import 'js-markdown-editor'
WXFEditor(elementID)
Usage
WXFEditor(elementID)
elementID [String] 需要挂载其上的元素id,必须为有效的元素
// 宽高将自动设置为接近 innerHeight innerWidth
Use with option
WXFEditor(elementID, options)
options [Object] some options
{
size: {
width: [String] whole width
height: [String] body height
}
}