4
4
[ ![ npm package] ( https://img.shields.io/npm/v/vue-simplemde.svg )] ( https://npmjs.org/package/vue-simplemde )
5
5
[ ![ npm downloads] ( http://img.shields.io/npm/dm/vue-simplemde.svg )] ( https://npmjs.org/package/vue-simplemde )
6
6
7
- # Demo
8
- [ Demo Page] ( https://F-loat.github.io/vue-simplemde/ )
7
+ ## Examples
8
+
9
+ > No longer support Vue1.x, you can modify to use
10
+
11
+ * [ Demo Page] ( https://f-loat.github.io/vue-simplemde/ )
12
+ * [ Demo Source] ( https://github.com/F-loat/vue-simplemde/tree/gh-pages )
13
+ * [ Simple Example] ( ./examples/index.vue )
14
+ * [ Nuxt Example] ( ./examples/nuxt )
9
15
10
16
# Use Setup
11
17
@@ -22,15 +28,15 @@ npm install vue-simplemde --save
22
28
## Use
23
29
24
30
``` javascript
25
- // 全局引用
31
+ // Global reference
26
32
import Vue from ' vue'
27
33
import VueSimplemde from ' vue-simplemde'
28
34
29
35
Vue .use (VueSimplemde)
30
36
```
31
37
32
38
``` javascript
33
- // 单个组件内引用
39
+ // Internal reference in a single component
34
40
import markdownEditor from ' vue-simplemde/src/markdown-editor'
35
41
36
42
export default {
@@ -41,26 +47,17 @@ export default {
41
47
```
42
48
43
49
## Props
44
- | 属性 | 类型 | 默认值 | 描述 |
50
+ | property | type | default | describe |
45
51
| ----| ----- | ----- | ---- |
46
- | value | String | 无 | 初始值,可使用v-model绑定 |
47
- | preview-class | String | 无 | 自定义预览样式类 |
48
- | autoinit | Boolean | true | 是否自动初始化 |
49
- | highlight | Boolean | false | 是否开启高亮 |
50
- | sanitize | Boolean | false | 开启后不渲染输入的html |
51
- | configs | Object | {} | [ SimpleMDE的配置项] ( #configuration ) |
52
-
53
- ## Examples
54
-
55
- > 不再支持Vue1.x,可自行修改使用
56
-
57
- * [ Demo Page] ( https://f-loat.github.io/vue-simplemde/ )
58
- * [ Demo Source] ( https://github.com/F-loat/vue-simplemde/tree/gh-pages )
59
- * [ Simple Example] ( ./examples/index.vue )
60
- * [ Nuxt Example] ( ./examples/nuxt )
52
+ | value | String | None | Initial value, v-model binding can be used |
53
+ | preview-class | String | None | Custom preview style class |
54
+ | autoinit | Boolean | true | Automatic initialization |
55
+ | highlight | Boolean | false | Is it open to highlight |
56
+ | sanitize | Boolean | false | HTML that does not render input after opening |
57
+ | configs | Object | {} | [ SimpleMDE's config] ( #configuration ) |
61
58
62
59
## Markdown style
63
- > e.g. 使用Github的markdown样式
60
+ > e.g. use Github's markdown style
64
61
65
62
[ github-markdown-css] ( https://github.com/sindresorhus/github-markdown-css )
66
63
@@ -103,12 +100,12 @@ $ npm install --save highlight.js
103
100
<style>
104
101
@import '~simplemde/dist/simplemde.min.css';
105
102
@import '~highlight.js/styles/atom-one-dark.css';
106
- /* 高亮主题可选列表: https://github.com/isagalaev/highlight.js/tree/master/src/styles */
103
+ /* Highlight theme list: https://github.com/isagalaev/highlight.js/tree/master/src/styles */
107
104
</style>
108
105
```
109
106
110
107
## Editor Theme ([ simplemde-theme-base] ( https://github.com/xcatliu/simplemde-theme-base/wiki/List-of-themes ) )
111
- > e.g. 使用simplemde -theme-base主题
108
+ > e.g. use simplemde -theme-base theme
112
109
113
110
### install
114
111
```
@@ -119,12 +116,12 @@ $ npm install --save simplemde-theme-base
119
116
``` vue
120
117
<style>
121
118
@import '~simplemde-theme-base/dist/simplemde-theme-base.min.css';
122
- /* 无需引入simplemde .min.css */
119
+ /* no need import imposimplemde .min.css */
123
120
</style>
124
121
```
125
122
126
123
## Configuration
127
- > SimpleMDE的配置
124
+ > SimpleMD's config
128
125
129
126
* [ 中文] ( doc/configuration_zh.md )
130
127
* [ English] ( doc/configuration_en.md )
@@ -137,4 +134,4 @@ $ npm install --save simplemde-theme-base
137
134
138
135
vue-simplemde is open source and released under the MIT Licence.
139
136
140
- Copyright (c) 2017 F-loat
137
+ Copyright (c) 2018 F-loat
0 commit comments