diff --git a/README.md b/README.md index d9b5916..1ddb89b 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,23 @@ Tips: 通过 `webpack` 导出为 `umd` 类型的文件。故支持以下几种 ``` +#### 方式2 npm +```cmd +npm i cool-md-editor --save +``` + +```js +const MdEditor = require('cool-md-editor'); +require('cool-md-editor/dist/coolMdEditor.css'); + +new MdEditor({ + el: document.getElementById('editor-wrap'), + defaultCon: '# 这是默认内容,任意填写' +}); +``` + -### [结构梳理](https://www.processon.com/view/link/5b88dc49e4b0534c9bc51b33) + ### 说明 diff --git a/package.json b/package.json index 4102941..1bb98fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cool-md-editor", - "version": "1.2.0-beta.6", + "version": "1.2.0", "description": "a markedown editor width webpack & codemirror & marked & highlight", "main": "dist/coolMdEditor.js", "unpkg": "dist/coolMdEditor.js",