File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 36
36
< div class ='sep10 '> </ div >
37
37
< ul class ='nav nav-pills '>
38
38
< li class ='active '> < a href ='#markdown-<%= indexInCollection+1 %> ' data-toggle ='pill '> markdown</ a > </ li >
39
- < li > < a href ='#preview-<%= indexInCollection+1 %> ' data-toggle ='pill '> 预览</ a > </ li >
39
+ < li > < a href ='#preview-<%= indexInCollection+1 %> ' data-toggle ='pill ' onclick =" prettyPrint() " > 预览</ a > </ li >
40
40
</ ul >
41
41
< div class ='tab-content '>
42
42
< div class ='active tab-pane ' id ='markdown-<%= indexInCollection+1 %> '>
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ <h3><% if(topic.top){%>[置顶]<% } %><%= topic.title %></h3>
118
118
< div class ='tabbable '>
119
119
< ul class ='nav nav-pills '>
120
120
< li class ='active '> < a href ='#markdown ' data-toggle ='pill '> markdown</ a > </ li >
121
- < li > < a href ='#preview ' data-toggle ='pill '> 预览</ a > </ li >
121
+ < li > < a href ='#preview ' data-toggle ='pill ' onclick =" prettyPrint() " > 预览</ a > </ li >
122
122
</ ul >
123
123
< div class ='tab-content '>
124
124
< div class ='tab-pane active ' id ='markdown '>
@@ -155,18 +155,21 @@ <h3><% if(topic.top){%>[置顶]<% } %><%= topic.title %></h3>
155
155
var converter = new Showdown . converter ( ) ;
156
156
var editor = new Markdown . Editor ( converter ) ;
157
157
editor . run ( ) ;
158
+ /*
158
159
editor.hooks.chain('onPreviewRefresh', function () {
159
160
prettyPrint();
160
161
});
161
-
162
+ */
162
163
$ ( '.reply2_editor' ) . each ( function ( ) {
163
164
var editor_id = $ ( this ) . attr ( 'id' ) ;
164
165
var suffix = editor_id . slice ( editor_id . indexOf ( '-' ) ) ;
165
166
var editor = new Markdown . Editor ( converter , suffix ) ;
166
167
editor . run ( ) ;
168
+ /*
167
169
editor.hooks.chain('onPreviewRefresh', function () {
168
170
prettyPrint();
169
171
});
172
+ */
170
173
} ) ;
171
174
}
172
175
run_md_editor ( ) ;
You can’t perform that action at this time.
0 commit comments