mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-06-27 13:11:01 -06:00
WIP: Multilines paste input fixed
This commit is contained in:
parent
f798a4e9d8
commit
7404f73ba5
@ -2546,7 +2546,6 @@ EasyMDE.prototype.render = function (el) {
|
||||
newText = headingCheckRow(oldText, cm);
|
||||
if (oldText !== newText) { // A modification has been made
|
||||
obj.text[r] = newText.substring(obj.from.ch);
|
||||
// obj.from.ch = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2558,9 +2557,16 @@ EasyMDE.prototype.render = function (el) {
|
||||
line: obj.from.line,
|
||||
ch: obj.from.ch + 8,
|
||||
});
|
||||
console.log( obj.txt[r] );
|
||||
console.log( endText );
|
||||
obj.text[r] = headingCheckRow(obj.text[r], cm);
|
||||
if (/#/.test(endText)) {
|
||||
var oldText = obj.text[r] + endText,
|
||||
newText = headingCheckRow(oldText, cm);
|
||||
if (oldText !== newText) { // A modification has been made
|
||||
obj.text[r] = newText.replace(endText, '');
|
||||
}
|
||||
}
|
||||
else {
|
||||
obj.text[r] = headingCheckRow(obj.text[r], cm);
|
||||
}
|
||||
}
|
||||
else { // 2nd and next rows
|
||||
obj.text[r] = headingCheckRow(obj.text[r], cm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user