Fix bug with inserting links and undoing things.

patch-ionaru
Jonatan Kłosko 8 years ago
parent 6abda7ab68
commit 6250a7d7e7

@ -795,8 +795,9 @@ function _replaceSelection(cm, active, startEnd, url) {
var text;
var start = startEnd[0];
var end = startEnd[1];
var startPoint = cm.getCursor("start");
var endPoint = cm.getCursor("end");
var startPoint = {}, endPoint = {};
Object.assign(startPoint, cm.getCursor("start"));
Object.assign(endPoint, cm.getCursor("end"));
if(url) {
end = end.replace("#url#", url);
}
@ -2025,4 +2026,4 @@ SimpleMDE.prototype.toTextArea = function() {
}
};
module.exports = SimpleMDE;
module.exports = SimpleMDE;

Loading…
Cancel
Save