making the image button of the editor actually add all the info needed, and made the images clickable for the full size
This commit is contained in:
+18
-41
File diff suppressed because one or more lines are too long
@@ -94,8 +94,14 @@
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@@ -206,9 +212,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
@@ -226,11 +229,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
@@ -252,8 +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;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
@@ -275,6 +275,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
@@ -297,7 +299,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor { position: absolute; }
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
@@ -324,9 +329,6 @@ div.CodeMirror-dragcursors {
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
|
||||
+9482
-8880
File diff suppressed because one or more lines are too long
+9482
-8881
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+1
-9
File diff suppressed because one or more lines are too long
@@ -47,7 +47,7 @@ function taskBrowserify(opts) {
|
||||
.bundle();
|
||||
}
|
||||
|
||||
gulp.task("browserify:debug", ["lint"], function() {
|
||||
gulp.task("browserify:debug", [], function() {
|
||||
return taskBrowserify({debug:true, standalone:"SimpleMDE"})
|
||||
.pipe(source("simplemde.debug.js"))
|
||||
.pipe(buffer())
|
||||
@@ -55,7 +55,7 @@ gulp.task("browserify:debug", ["lint"], function() {
|
||||
.pipe(gulp.dest("./debug/"));
|
||||
});
|
||||
|
||||
gulp.task("browserify", ["lint"], function() {
|
||||
gulp.task("browserify", [], function() {
|
||||
return taskBrowserify({standalone:"SimpleMDE"})
|
||||
.pipe(source("simplemde.js"))
|
||||
.pipe(buffer())
|
||||
@@ -63,7 +63,7 @@ gulp.task("browserify", ["lint"], function() {
|
||||
.pipe(gulp.dest("./debug/"));
|
||||
});
|
||||
|
||||
gulp.task("scripts", ["browserify:debug", "browserify", "lint"], function() {
|
||||
gulp.task("scripts", ["browserify:debug", "browserify"], function() {
|
||||
var js_files = ["./debug/simplemde.js"];
|
||||
|
||||
return gulp.src(js_files)
|
||||
|
||||
@@ -635,11 +635,14 @@ function drawImage(editor) {
|
||||
var stat = getState(cm);
|
||||
var options = editor.options;
|
||||
var url = "http://";
|
||||
if(options.promptURLs) {
|
||||
if(options.imageURLFn) {
|
||||
url = options.imageURLFn();
|
||||
} else if(options.promptURLs) {
|
||||
url = prompt(options.promptTexts.image);
|
||||
if(!url) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!url) {
|
||||
return false;
|
||||
}
|
||||
_replaceSelection(cm, stat.image, options.insertTexts.image, url);
|
||||
}
|
||||
@@ -2026,4 +2029,4 @@ SimpleMDE.prototype.toTextArea = function() {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SimpleMDE;
|
||||
module.exports = SimpleMDE;
|
||||
Reference in New Issue
Block a user