Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 17, 2015
1 parent b6b79c8 commit 5da6f6e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@
- 添加 `MDEditor.min.css` 样式
- 添加 `MDEditor.min.js` 并不是 ~~`lib/MDEditor.js`~~
- 添加编辑器初始节点
- 如果预加载长篇markdown文本必须嵌套 `<textarea>` 标签

```html
<link rel="stylesheet" type="text/css" href="../themes/default/css/MDEditor.min.css">
<script type="text/javascript" src="../build/MDEditor.min.js"></script>
<div id="mdeditor">
# 这里放markdown初始值
<textarea># 这里放markdown初始值
- id: 节点id
- minheight: 初始化编辑器高度
- maxheight: 编辑器随着输入内容增多而变高,这个值是它的最大值
- value: 默认编辑器中显示markdown内容
</textarea>
</div>
<script type="text/javascript">
var mde = new MDEditor({
Expand Down Expand Up @@ -47,6 +49,13 @@ var mde = new MDEditor({
mde.load()
```

## preview
默认展示预览界面

```js
mde.preview()
```

## input
输入事件,在编辑器里面输入内容就会执行input方法

Expand Down

0 comments on commit 5da6f6e

Please sign in to comment.