Merge pull request #289 from foreachlt/style-selected-text

Added mark-selection plugin
pull/301/head
Wes Cossick 8 years ago
commit 2f4e7e4d9b

@ -106,6 +106,7 @@ simplemde.value("This text will appear in the editor");
- **tabSize**: If set, customize the tab size. Defaults to `2`.
- **toolbar**: If set to `false`, hide the toolbar. Defaults to the [array of icons](#toolbar-icons).
- **toolbarTips**: If set to `false`, disable toolbar button tips. Defaults to `true`.
- **styleSelectedText**: If set to `false`, remove `.CodeMirror-selectedtext` class from selected lines. Defaults to `true`.
```JavaScript
// Most options demonstrate the non-default behavior

@ -7,6 +7,7 @@ require("codemirror/addon/display/fullscreen.js");
require("codemirror/mode/markdown/markdown.js");
require("codemirror/addon/mode/overlay.js");
require("codemirror/addon/display/placeholder.js");
require("codemirror/addon/selection/mark-selection.js");
require("codemirror/mode/gfm/gfm.js");
require("codemirror/mode/xml/xml.js");
require("spell-checker");
@ -1483,7 +1484,8 @@ SimpleMDE.prototype.render = function(el) {
extraKeys: keyMaps,
lineWrapping: (options.lineWrapping === false) ? false : true,
allowDropFileTypes: ["text/plain"],
placeholder: options.placeholder || el.getAttribute("placeholder") || ""
placeholder: options.placeholder || el.getAttribute("placeholder") || "",
styleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : true
});
if(options.forceSync === true) {

Loading…
Cancel
Save