2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-09-24 16:40:55 -06:00

Merge f861b998fee97f9b618055ebc08379110ac4dceb into aa0304fdaa85ba2cb80d2541547f842d1428f229

This commit is contained in:
Benedikt Rötsch 2019-04-18 13:27:05 +00:00 committed by GitHub
commit 493667605d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 709 additions and 447 deletions

47
package-lock.json generated
View File

@ -1991,8 +1991,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
@ -2013,14 +2012,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -2035,20 +2032,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -2165,8 +2159,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -2178,7 +2171,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -2193,7 +2185,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -2201,14 +2192,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -2227,7 +2216,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -2308,8 +2296,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
@ -2321,7 +2308,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -2407,8 +2393,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
@ -2444,7 +2429,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -2464,7 +2448,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -2508,14 +2491,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
@ -4157,6 +4138,12 @@
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
"prettier": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
"integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==",
"dev": true
},
"pretty-hrtime": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",

View File

@ -33,6 +33,7 @@
"gulp-header": "^2.0.7",
"gulp-rename": "^1.4.0",
"gulp-uglify": "^3.0.1",
"prettier": "1.17.0",
"typescript": "^3.3.3",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^2.0.0"
@ -40,6 +41,12 @@
"repository": "github:Ionaru/easy-markdown-editor",
"scripts": {
"prepare": "gulp",
"test:types": "tsc --project types/tsconfig.json"
"test:types": "tsc --project types/tsconfig.json",
"format": "prettier --write 'src/**/*' && eslint --fix"
},
"prettier": {
"trailingComma": "es5",
"tabWidth": 4,
"singleQuote": true
}
}

View File

@ -32,7 +32,7 @@
}
.CodeMirror-placeholder {
opacity: .5;
opacity: 0.5;
}
.CodeMirror-focused .CodeMirror-selected {
@ -62,11 +62,11 @@
}
.editor-toolbar:before {
margin-bottom: 8px
margin-bottom: 8px;
}
.editor-toolbar:after {
margin-top: 8px
margin-top: 8px;
}
.editor-toolbar.fullscreen {
@ -90,12 +90,38 @@
.editor-toolbar.fullscreen::before {
width: 20px;
height: 50px;
background: -moz-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(255, 255, 255, 0)));
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
background: -o-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
background: -ms-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
background: -moz-linear-gradient(
left,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 0) 100%
);
background: -webkit-gradient(
linear,
left top,
right top,
color-stop(0%, rgba(255, 255, 255, 1)),
color-stop(100%, rgba(255, 255, 255, 0))
);
background: -webkit-linear-gradient(
left,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 0) 100%
);
background: -o-linear-gradient(
left,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 0) 100%
);
background: -ms-linear-gradient(
left,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 0) 100%
);
background: linear-gradient(
to right,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 0) 100%
);
position: fixed;
top: 0;
left: 0;
@ -106,12 +132,38 @@
.editor-toolbar.fullscreen::after {
width: 20px;
height: 50px;
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 1)));
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
background: -moz-linear-gradient(
left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -webkit-gradient(
linear,
left top,
right top,
color-stop(0%, rgba(255, 255, 255, 0)),
color-stop(100%, rgba(255, 255, 255, 1))
);
background: -webkit-linear-gradient(
left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -o-linear-gradient(
left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -ms-linear-gradient(
left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
background: linear-gradient(
to right,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
position: fixed;
top: 0;
right: 0;
@ -150,7 +202,7 @@
}
.editor-toolbar button:after {
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-size: 65%;
vertical-align: text-bottom;
position: relative;
@ -158,27 +210,27 @@
}
.editor-toolbar button.heading-1:after {
content: "1";
content: '1';
}
.editor-toolbar button.heading-2:after {
content: "2";
content: '2';
}
.editor-toolbar button.heading-3:after {
content: "3";
content: '3';
}
.editor-toolbar button.heading-bigger:after {
content: "▲";
content: '▲';
}
.editor-toolbar button.heading-smaller:after {
content: "▼";
content: '▼';
}
.editor-toolbar.disabled-for-preview button:not(.no-disable) {
opacity: .6;
opacity: 0.6;
pointer-events: none;
}
@ -202,15 +254,15 @@
}
.editor-statusbar .lines:before {
content: 'lines: '
content: 'lines: ';
}
.editor-statusbar .words:before {
content: 'words: '
content: 'words: ';
}
.editor-statusbar .characters:before {
content: 'characters: '
content: 'characters: ';
}
.editor-preview {
@ -244,16 +296,16 @@
}
.editor-preview-active-side {
display: block
display: block;
}
.editor-preview-active {
display: block
display: block;
}
.editor-preview > p,
.editor-preview-side > p {
margin-top: 0
margin-top: 0;
}
.editor-preview pre,
@ -303,7 +355,7 @@
}
.cm-s-easymde .cm-comment {
background: rgba(0, 0, 0, .05);
background: rgba(0, 0, 0, 0.05);
border-radius: 2px;
}

View File

@ -16,8 +16,7 @@ CodeMirror.commands.tabAndIndentMarkdownList = function (cm) {
if (cm.options.indentWithTabs) {
cm.execCommand('insertTab');
}
else {
} else {
var spaces = Array(cm.options.tabSize + 1).join(' ');
cm.replaceSelection(spaces);
}
@ -36,8 +35,7 @@ CodeMirror.commands.shiftTabAndUnindentMarkdownList = function (cm) {
if (cm.options.indentWithTabs) {
cm.execCommand('insertTab');
}
else {
} else {
var spaces = Array(cm.options.tabSize + 1).join(' ');
cm.replaceSelection(spaces);
}

File diff suppressed because it is too large Load Diff