Skip to content

Commit

Permalink
Merge pull request #353 from NextStepWebs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
WesCossick committed Jun 8, 2016
2 parents 6eae597 + 6676411 commit 316b8a5
Show file tree
Hide file tree
Showing 11 changed files with 4,818 additions and 594 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- '6'
- '5'
- '4'
- '0.12'
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Via [bower](https://www.bower.io).
bower install simplemde --save
```

Via [jsDelivr](http://www.jsdelivr.com/#!simplemde). *Please note, jsDelivr may take a few days to update to the latest release.*
Via [jsDelivr](https://www.jsdelivr.com/#!simplemde). *Please note, jsDelivr may take a few days to update to the latest release.*

```HTML
<link rel="stylesheet" href="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
```

## Quick start
Expand Down Expand Up @@ -103,6 +103,7 @@ simplemde.value("This text will appear in the editor");
- **spellChecker**: If set to `false`, disable the spell checker. Defaults to `true`.
- **status**: If set to `false`, hide the status bar. Defaults to the array of built-in status bar items.
- Optionally, you can set an array of status bar items to include, and in what order. You can even define your own custom status bar items.
- **styleSelectedText**: If set to `false`, remove the `CodeMirror-selectedtext` class from selected lines. Defaults to `true`.
- **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`.
Expand Down Expand Up @@ -170,6 +171,7 @@ var simplemde = new SimpleMDE({
el.innerHTML = ++this.keystrokes + " Keystrokes";
}
}], // Another optional usage, with a custom status bar item that counts keystrokes
styleSelectedText: false,
tabSize: 4,
toolbar: false,
toolbarTips: false,
Expand Down Expand Up @@ -225,7 +227,7 @@ var simplemde = new SimpleMDE({
},
{
name: "custom",
action: customFunction(editor){
action: function customFunction(editor){
// Add your own code
},
className: "fa fa-star",
Expand Down Expand Up @@ -324,6 +326,6 @@ simplemde.clearAutosavedValue(); // no returned value
```

## How it works
SimpleMDE began as an improvement of [lepture's Editor project](https://github.com/lepture/editor), but has now taken on an identity of its own. It is bundled with [CodeMirror](https://github.com/codemirror/codemirror) and depends on [Font Awesome](http://fortawesome.github.io/Font-Awesome/).
SimpleMDE began as an improvement of [lepture's Editor project](https://github.com/lepture/editor), but has now taken on an identity of its own. It is bundled with [CodeMirror](https://github.com/codemirror/codemirror) and depends on [Font Awesome](http://fontawesome.io).

CodeMirror is the backbone of the project and parses much of the Markdown syntax as it's being written. This allows us to add styles to the Markdown that's being written. Additionally, a toolbar and status bar have been added to the top and bottom, respectively. Previews are rendered by [Marked](https://github.com/chjj/marked) using GFM.
44 changes: 21 additions & 23 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
{
"name": "simplemde",
"version": "1.10.1",
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"authors": [
"Wes Cossick"
],
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor.",
"main": ["dist/simplemde.min.js", "dist/simplemde.min.css"],
"moduleType": [
"globals"
],
"keywords": [
"embeddable",
"markdown",
"editor",
"javascript",
"wysiwyg"
],
"license": "MIT",
"ignore": [
"node_modules",
"bower_components"
]
"name": "simplemde",
"version": "1.11.0",
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"authors": [
"Wes Cossick <https://wescossick.com>"
],
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor.",
"main": ["src/js/simplemde.js", "src/css/simplemde.css"],
"keywords": [
"embeddable",
"markdown",
"editor",
"javascript",
"wysiwyg"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
]
}
9 changes: 6 additions & 3 deletions debug/simplemde.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* simplemde v1.10.1
* simplemde v1.11.0
* Copyright Next Step Webs, Inc.
* @link https://github.com/NextStepWebs/simplemde-markdown-editor
* @license MIT
Expand Down Expand Up @@ -58,7 +58,7 @@
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0;
border: 0 !important;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
Expand Down Expand Up @@ -197,6 +197,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}

.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
min-height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
Expand Down Expand Up @@ -251,6 +252,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
Expand Down Expand Up @@ -669,5 +672,5 @@ span.CodeMirror-selectedtext { background: none; }
opacity: .5;
}
.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {
background: rgba(255, 0, 0, .15);
background: rgba(255, 0, 0, .15);
}
Loading

0 comments on commit 316b8a5

Please sign in to comment.