Kaynağa Gözat

Crop pasted table to its established dimensions.

Maciej Gołaszewski 5 yıl önce
ebeveyn
işleme
486c16d6f9

+ 7 - 0
packages/ckeditor5-table/src/tableclipboard.js

@@ -179,6 +179,13 @@ export default class TableClipboard extends Plugin {
 				};
 				};
 
 
 				pastedTable = cropTableToDimensions( pastedTable, cropDimensions, writer, tableUtils );
 				pastedTable = cropTableToDimensions( pastedTable, cropDimensions, writer, tableUtils );
+			} else {
+				pastedTable = cropTableToDimensions( pastedTable, {
+					startRow: 0,
+					endRow: pasteHeight - 1,
+					startColumn: 0,
+					endColumn: pasteWidth - 1
+				}, writer, tableUtils );
 			}
 			}
 
 
 			// Holds two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.
 			// Holds two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.