Skip to content

Commit 653dde0

Browse files
committed
Merge pull request sparksuite#139 from NextStepWebs/development
UMD design, Bower support, Linting, Bug fixes
2 parents 7bc9d9b + 0554746 commit 653dde0

24 files changed

+20065
-3965
lines changed

.eslintrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"rules": {
3+
"indent": [
4+
2,
5+
"tab"
6+
],
7+
"strict": 0,
8+
"no-console": 0,
9+
"quotes": [
10+
2,
11+
"double"
12+
],
13+
"semi": [
14+
2,
15+
"always"
16+
]
17+
},
18+
"env": {
19+
"browser": true,
20+
"node":true
21+
},
22+
"extends": "eslint:recommended"
23+
}

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
localtesting/*
1+
localtesting/
22
node_modules/
3+
bower_components/
4+
5+
#For IDE
6+
*.iml
7+
*.ipr
8+
*.iws
9+
.idea/

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,36 @@ A drop-in JavaScript textarea replacement for writing beautiful and understandab
88
## Why not a WYSIWYG editor or pure Markdown?
99
WYSIWYG editors that produce HTML are often complex and buggy. Markdown solves this problem in many ways, plus Markdown can be rendered natively on more platforms than HTML. However, Markdown is not a syntax that an average user will be familiar with, nor is it visually clear while editing. In otherwords, for an unfamiliar user, the syntax they write will make little sense until they click the preview button. SimpleMDE has been designed to bridge this gap for non-technical users who are less familiar with or just learning Markdown syntax.
1010

11-
## Quick start
12-
SimpleMDE is available on [npm](https://www.npmjs.com/package/simplemde).
11+
## Install
12+
13+
Via [npm](https://www.npmjs.com/package/simplemde).
1314
```
1415
npm install simplemde --save
1516
```
1617

17-
SimpleMDE is also available on [jsDelivr](http://www.jsdelivr.com/#!simplemde). *Please note, jsDelivr may take a few days to update to the latest release.*
18+
Via [bower](https://www.bower.io).
19+
```
20+
bower install simplemde --save
21+
```
22+
23+
Via [jsDelivr](http://www.jsdelivr.com/#!simplemde). *Please note, jsDelivr may take a few days to update to the latest release.*
1824

1925
```HTML
2026
<link rel="stylesheet" href="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
2127
<script src="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
2228
```
2329

24-
And then load SimpleMDE on the first textarea on a page
30+
## Quick start
31+
32+
After installing, load SimpleMDE on the first textarea on a page
2533

2634
```HTML
2735
<script>
2836
var simplemde = new SimpleMDE();
2937
</script>
3038
```
3139

32-
#### Use a specific textarea
40+
#### Using a specific textarea
3341

3442
Pure JavaScript method
3543

@@ -112,7 +120,7 @@ var simplemde = new SimpleMDE({
112120
}, 250);
113121

114122
return "Loading...";
115-
}
123+
},
116124
renderingConfig: {
117125
singleLineBreaks: false,
118126
codeSyntaxHighlighting: true,
@@ -203,6 +211,16 @@ simplemde.codemirror.on("change", function(){
203211
});
204212
```
205213

214+
## State methods
215+
The following methods will let you check on the state of the editor.
216+
217+
```js
218+
var simplemde = new SimpleMDE();
219+
simplemde.isPreviewActive();
220+
simplemde.isSideBySideActive();
221+
simplemde.isFullscreenActive();
222+
```
223+
206224
## How it works
207225
SimpleMDE is an improvement of [lepture's Editor project](https://github.com/lepture/editor) and includes a great many number of changes. It is bundled with [CodeMirror](https://github.com/codemirror/codemirror) and depends on [Font Awesome](http://fortawesome.github.io/Font-Awesome/).
208226

bower.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "simplemde-markdown-editor",
3+
"version": "1.8.0",
4+
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
5+
"authors": [
6+
"Wes Cossick"
7+
],
8+
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor.",
9+
"main": ["dist/simplemde.min.js", "dist/simplemde.min.css"],
10+
"moduleType": [
11+
"globals"
12+
],
13+
"keywords": [
14+
"embeddable",
15+
"markdown",
16+
"editor",
17+
"javascript",
18+
"wysiwyg"
19+
],
20+
"license": "MIT",
21+
"ignore": [
22+
"node_modules",
23+
"bower_components"
24+
]
25+
}

0 commit comments

Comments
 (0)