mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-05-04 23:13:14 +02:00
fix issue #286
This commit is contained in:
parent
9eb0411d82
commit
4a8ce0bd12
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SimpleMDE = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
(function (global){
|
||||
|
||||
; Typo = global.Typo = require("D:\\My Web Sites\\simplemde-markdown-editor\\node_modules\\codemirror-spell-checker\\src\\js\\typo.js");
|
||||
; Typo = global.Typo = require("/home/prostoandrei/Projects/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js");
|
||||
CodeMirror = global.CodeMirror = require("codemirror");
|
||||
; var __browserify_shim_require__=require;(function browserifyShim(module, define, require) {
|
||||
// Initialize data globally to reduce memory consumption
|
||||
|
@ -105,7 +105,7 @@ if(!String.prototype.includes) {
|
|||
}).call(global, module, undefined, undefined);
|
||||
|
||||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{"D:\\My Web Sites\\simplemde-markdown-editor\\node_modules\\codemirror-spell-checker\\src\\js\\typo.js":2,"codemirror":7}],2:[function(require,module,exports){
|
||||
},{"/home/prostoandrei/Projects/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js":2,"codemirror":7}],2:[function(require,module,exports){
|
||||
(function (global){
|
||||
; var __browserify_shim_require__=require;(function browserifyShim(module, exports, require, define, browserify_shim__define__module__export__) {
|
||||
'use strict';
|
||||
|
@ -1876,6 +1876,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
|
||||
function postUpdateDisplay(cm, update) {
|
||||
var viewport = update.viewport;
|
||||
|
||||
for (var first = true;; first = false) {
|
||||
if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
|
||||
// Clip forced viewport to actual scrollable area.
|
||||
|
@ -1891,8 +1892,8 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
updateHeightsInViewport(cm);
|
||||
var barMeasure = measureForScrollbars(cm);
|
||||
updateSelection(cm);
|
||||
setDocumentHeight(cm, barMeasure);
|
||||
updateScrollbars(cm, barMeasure);
|
||||
setDocumentHeight(cm, barMeasure);
|
||||
}
|
||||
|
||||
update.signal(cm, "update", cm);
|
||||
|
@ -1909,8 +1910,8 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
postUpdateDisplay(cm, update);
|
||||
var barMeasure = measureForScrollbars(cm);
|
||||
updateSelection(cm);
|
||||
setDocumentHeight(cm, barMeasure);
|
||||
updateScrollbars(cm, barMeasure);
|
||||
setDocumentHeight(cm, barMeasure);
|
||||
update.finish();
|
||||
}
|
||||
}
|
||||
|
@ -1918,8 +1919,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
function setDocumentHeight(cm, measure) {
|
||||
cm.display.sizer.style.minHeight = measure.docHeight + "px";
|
||||
cm.display.heightForcer.style.top = measure.docHeight + "px";
|
||||
cm.display.gutters.style.height = Math.max(measure.docHeight + cm.display.barHeight + scrollGap(cm),
|
||||
measure.clientHeight) + "px";
|
||||
cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
|
||||
}
|
||||
|
||||
// Read the actual heights of the rendered lines, and update their
|
||||
|
@ -4244,10 +4244,10 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
|
||||
if (op.preparedSelection)
|
||||
cm.display.input.showSelection(op.preparedSelection);
|
||||
if (op.updatedDisplay)
|
||||
setDocumentHeight(cm, op.barMeasure);
|
||||
if (op.updatedDisplay || op.startHeight != cm.doc.height)
|
||||
updateScrollbars(cm, op.barMeasure);
|
||||
if (op.updatedDisplay)
|
||||
setDocumentHeight(cm, op.barMeasure);
|
||||
|
||||
if (op.selectionChanged) restartBlink(cm);
|
||||
|
||||
|
@ -4624,7 +4624,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
|
||||
start: function(e){onDragStart(cm, e);},
|
||||
drop: operation(cm, onDrop),
|
||||
leave: function() {clearDragCursor(cm);}
|
||||
leave: function(e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
|
||||
};
|
||||
|
||||
var inp = d.input.getField();
|
||||
|
@ -8775,9 +8775,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
},
|
||||
|
||||
posFromIndex: function(off) {
|
||||
var ch, lineNo = this.first;
|
||||
var ch, lineNo = this.first, sepSize = this.lineSeparator().length;
|
||||
this.iter(function(line) {
|
||||
var sz = line.text.length + 1;
|
||||
var sz = line.text.length + sepSize;
|
||||
if (sz > off) { ch = off; return true; }
|
||||
off -= sz;
|
||||
++lineNo;
|
||||
|
@ -8788,8 +8788,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
coords = clipPos(this, coords);
|
||||
var index = coords.ch;
|
||||
if (coords.line < this.first || coords.ch < 0) return 0;
|
||||
var sepSize = this.lineSeparator().length;
|
||||
this.iter(this.first, coords.line, function (line) {
|
||||
index += line.text.length + 1;
|
||||
index += line.text.length + sepSize;
|
||||
});
|
||||
return index;
|
||||
},
|
||||
|
@ -10018,7 +10019,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
|
||||
// THE END
|
||||
|
||||
CodeMirror.version = "5.12.1";
|
||||
CodeMirror.version = "5.13.3";
|
||||
|
||||
return CodeMirror;
|
||||
});
|
||||
|
@ -11069,6 +11070,7 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
|
|||
{name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
|
||||
{name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
|
||||
{name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
|
||||
{name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
|
||||
{name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
|
||||
{name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
|
||||
{name: "Python", mime: "text/x-python", mode: "python", ext: ["py", "pyw"]},
|
||||
|
@ -14575,9 +14577,7 @@ SimpleMDE.prototype.createToolbar = function(items) {
|
|||
var nonSeparatorIconsFollow = false;
|
||||
|
||||
for(var x = (i + 1); x < items.length; x++) {
|
||||
console.log(x);
|
||||
if(items[x] !== "|" && (!self.options.hideIcons || self.options.hideIcons.indexOf(items[x].name) == -1)) {
|
||||
console.log(items[x]);
|
||||
nonSeparatorIconsFollow = true;
|
||||
}
|
||||
}
|
||||
|
@ -14892,9 +14892,15 @@ SimpleMDE.prototype.toTextArea = function() {
|
|||
var cm = this.codemirror;
|
||||
var wrapper = cm.getWrapperElement();
|
||||
|
||||
wrapper.parentNode.removeChild(this.gui.toolbar);
|
||||
wrapper.parentNode.removeChild(this.gui.statusbar);
|
||||
wrapper.parentNode.removeChild(this.gui.sideBySide);
|
||||
if(this.gui.toolbar) {
|
||||
wrapper.parentNode.removeChild(this.gui.toolbar);
|
||||
}
|
||||
if(this.gui.statusbar) {
|
||||
wrapper.parentNode.removeChild(this.gui.statusbar);
|
||||
}
|
||||
if(this.gui.sideBySide) {
|
||||
wrapper.parentNode.removeChild(this.gui.sideBySide);
|
||||
}
|
||||
|
||||
cm.toTextArea();
|
||||
|
||||
|
|
2
dist/simplemde.min.css
vendored
2
dist/simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
16
dist/simplemde.min.js
vendored
16
dist/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1987,9 +1987,15 @@ SimpleMDE.prototype.toTextArea = function() {
|
|||
var cm = this.codemirror;
|
||||
var wrapper = cm.getWrapperElement();
|
||||
|
||||
wrapper.parentNode.removeChild(this.gui.toolbar);
|
||||
wrapper.parentNode.removeChild(this.gui.statusbar);
|
||||
wrapper.parentNode.removeChild(this.gui.sideBySide);
|
||||
if(this.gui.toolbar) {
|
||||
wrapper.parentNode.removeChild(this.gui.toolbar);
|
||||
}
|
||||
if(this.gui.statusbar) {
|
||||
wrapper.parentNode.removeChild(this.gui.statusbar);
|
||||
}
|
||||
if(this.gui.sideBySide) {
|
||||
wrapper.parentNode.removeChild(this.gui.sideBySide);
|
||||
}
|
||||
|
||||
cm.toTextArea();
|
||||
|
||||
|
@ -2000,4 +2006,4 @@ SimpleMDE.prototype.toTextArea = function() {
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = SimpleMDE;
|
||||
module.exports = SimpleMDE;
|
Loading…
Reference in a new issue