Merge ef61b04b11df8f92856d3ed45ceb8b59d7d90a0f into 97154e2bfc9d9b9d35efb6103bc8229ffe424f3a

This commit is contained in:
Rui Saraiva 2016-06-08 02:10:12 +00:00
commit 047183d916
7 changed files with 806 additions and 1725 deletions

View File

@ -88,6 +88,7 @@ simplemde.value("This text will appear in the editor");
- link - link
- table - table
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`. - **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
- **mode**: Can be set with `gfm` (Markdown), `yaml` or `yaml-frontmatter`. Defaults to `gfm`.
- **parsingConfig**: Adjust settings for parsing the Markdown during editing (not previewing). - **parsingConfig**: Adjust settings for parsing the Markdown during editing (not previewing).
- **allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`. - **allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`.
- **strikethrough**: If set to `false`, will not process GFM strikethrough syntax. Defaults to `true`. - **strikethrough**: If set to `false`, will not process GFM strikethrough syntax. Defaults to `true`.

View File

@ -58,7 +58,7 @@
} }
.cm-fat-cursor .CodeMirror-cursor { .cm-fat-cursor .CodeMirror-cursor {
width: auto; width: auto;
border: 0; border: 0 !important;
background: #7e7; background: #7e7;
} }
.cm-fat-cursor div.CodeMirror-cursors { .cm-fat-cursor div.CodeMirror-cursors {
@ -94,8 +94,14 @@
.cm-tab { display: inline-block; text-decoration: inherit; } .cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-rulers {
position: absolute;
left: 0; right: 0; top: -50px; bottom: -20px;
overflow: hidden;
}
.CodeMirror-ruler { .CodeMirror-ruler {
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
top: 0; bottom: 0;
position: absolute; position: absolute;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

16
dist/simplemde.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,8 @@ require("codemirror/addon/display/placeholder.js");
require("codemirror/addon/selection/mark-selection.js"); require("codemirror/addon/selection/mark-selection.js");
require("codemirror/mode/gfm/gfm.js"); require("codemirror/mode/gfm/gfm.js");
require("codemirror/mode/xml/xml.js"); require("codemirror/mode/xml/xml.js");
require("codemirror/mode/yaml/yaml.js");
require("codemirror/mode/yaml-frontmatter/yaml-frontmatter.js");
require("spell-checker"); require("spell-checker");
var marked = require("marked"); var marked = require("marked");
@ -1464,11 +1466,11 @@ SimpleMDE.prototype.render = function(el) {
if(options.spellChecker !== false) { if(options.spellChecker !== false) {
mode = "spell-checker"; mode = "spell-checker";
backdrop = options.parsingConfig; backdrop = options.parsingConfig;
backdrop.name = "gfm"; backdrop.name = options.mode || "gfm";
backdrop.gitHubSpice = false; backdrop.gitHubSpice = false;
} else { } else {
mode = options.parsingConfig; mode = options.parsingConfig;
mode.name = "gfm"; mode.name = options.mode || "gfm";
mode.gitHubSpice = false; mode.gitHubSpice = false;
} }