File tree 2 files changed +4
-1
lines changed 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ simplemde.value("This text will appear in the editor");
106
106
- ** tabSize** : If set, customize the tab size. Defaults to ` 2 ` .
107
107
- ** toolbar** : If set to ` false ` , hide the toolbar. Defaults to the [ array of icons] ( #toolbar-icons ) .
108
108
- ** toolbarTips** : If set to ` false ` , disable toolbar button tips. Defaults to ` true ` .
109
+ - ** styleSelectedText** : If set to ` false ` , remove ` .CodeMirror-selectedtext ` class from selected lines. Defaults to ` true ` .
109
110
110
111
``` JavaScript
111
112
// Most options demonstrate the non-default behavior
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ require("codemirror/addon/display/fullscreen.js");
7
7
require ( "codemirror/mode/markdown/markdown.js" ) ;
8
8
require ( "codemirror/addon/mode/overlay.js" ) ;
9
9
require ( "codemirror/addon/display/placeholder.js" ) ;
10
+ require ( "codemirror/addon/selection/mark-selection.js" ) ;
10
11
require ( "codemirror/mode/gfm/gfm.js" ) ;
11
12
require ( "codemirror/mode/xml/xml.js" ) ;
12
13
require ( "spell-checker" ) ;
@@ -1483,7 +1484,8 @@ SimpleMDE.prototype.render = function(el) {
1483
1484
extraKeys : keyMaps ,
1484
1485
lineWrapping : ( options . lineWrapping === false ) ? false : true ,
1485
1486
allowDropFileTypes : [ "text/plain" ] ,
1486
- placeholder : options . placeholder || el . getAttribute ( "placeholder" ) || ""
1487
+ placeholder : options . placeholder || el . getAttribute ( "placeholder" ) || "" ,
1488
+ styleSelectedText : ( options . styleSelectedText != undefined ) ? options . styleSelectedText : true
1487
1489
} ) ;
1488
1490
1489
1491
if ( options . forceSync === true ) {
You can’t perform that action at this time.
0 commit comments