File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 88 'mention' : 'false' , # to enable/disable mention
99 'jquery' : 'true' , # to include/revoke jquery (require for admin default django)
1010 'living' : 'false' , # to enable/disable live updates in preview
11- 'spellcheck' : 'true' , # to enable/disable spellcheck in form textareas
11+ 'spellcheck' : 'true' , # to enable/disable spellcheck in form textareas
12+ 'hljs' : 'true' , # to enable/disable hljs highlighting in preview
1213 }
1314)
1415
Original file line number Diff line number Diff line change 162162 contentType : false ,
163163 success : function ( response ) {
164164 if ( response ) {
165- currentTab . html ( response ) ;
166- $ ( 'pre' ) . each ( function ( i , block ) {
167- hljs . highlightBlock ( block ) ;
168- } ) ;
165+ currentTab . html ( response ) . removeClass ( 'martor-preview-stale' ) ;
166+ if ( editorConfig . hljs == 'true' ) {
167+ $ ( 'pre' ) . each ( function ( i , block ) {
168+ hljs . highlightBlock ( block ) ;
169+ } ) ;
170+ }
169171 needsRefresh = false ;
170172 } else {
171173 currentTab . html ( '<p>Nothing to preview</p>' ) ;
You can’t perform that action at this time.
0 commit comments