File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -77,16 +77,17 @@ export default {
77
77
console .log (this .simplemde )
78
78
this .simplemde .value (' hellow' )
79
79
80
- // You can catch the following list of events: https://codemirror.net/doc/manual.html#events
81
- this .simplemde .codemirror .on (' change' , () => {
82
- console .log (this .simplemde .value ())
80
+ // 'change'事件已经绑定,可以通过@input指定处理器
81
+ // 如果需要,你可以自行绑定这个列表中的其他事件: https://codemirror.net/doc/manual.html#events
82
+ this .simplemde .codemirror .on (' beforeChange' , (instance , changeObj ) => {
83
+ // do some things
83
84
})
84
85
85
- // Removing SimpleMDE from textarea
86
+ // 移除SimpleMDE,组件销毁时会自动调用
86
87
this .simplemde .toTextArea ()
87
88
this .simplemde = null
88
89
89
- // Useful methods
90
+ // 一些有用的方法
90
91
this .simplemde .isPreviewActive () // returns boolean
91
92
this .simplemde .isSideBySideActive () // returns boolean
92
93
this .simplemde .isFullscreenActive () // returns boolean
You can’t perform that action at this time.
0 commit comments