Przeglądaj źródła

DSK 205 从Excel粘贴项目特征到软件,应保留回车换行

TonyKang 4 lat temu
rodzic
commit
f0194d0190

+ 1 - 1
handsontable/package.json

@@ -10,7 +10,7 @@
     "url": "https://github.com/handsontable/handsontable/issues"
   },
   "author": "Handsoncode <hello@handsontable.com>",
-  "version": "6.3.12",
+  "version": "6.3.13",
   "browser": "dist/handsontable.js",
   "main": "commonjs/index.js",
   "module": "es/index.js",

+ 1 - 1
handsontable/src/plugins/copyPaste/utils.js

@@ -77,7 +77,7 @@ export function tableToArray(element) {
 
       for (let column = 0; column < cellsLen; column += 1) {
         const cell = cells[column];
-        cell.innerHTML = cell.innerHTML.trim().replace(/<br(.|)>(\n?)/, '\n');
+        cell.innerHTML = cell.innerHTML.trim().replace(/<br(.|)>(\n?)/g, '\n');
         const cellText = cell.innerText;
 
         newRow.push(cellText);