From 285b5035daae7678455f65e3bfdc91b08c15f88d Mon Sep 17 00:00:00 2001 From: davien21 Date: Thu, 9 Dec 2021 01:44:35 +0100 Subject: [PATCH] CHG: fix bug that removes soft line breaks on pasting content --- lib/simditor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/simditor.js b/lib/simditor.js index 564ef062..2f77578d 100644 --- a/lib/simditor.js +++ b/lib/simditor.js @@ -618,7 +618,8 @@ Formatter = (function(superClass) { return; } if ($node[0].nodeType === 3) { - text = $node.text().replace(/(\r\n|\n|\r)/gm, ''); + text = $node.text().replace(/(\r\n|\n)/gm, ""); + text = $node.text().replace(/(\r)/gm, " "); if (text) { textNode = document.createTextNode(text); $node.replaceWith(textNode);