Ver código fonte

Crop pasted table to its established dimensions.

Maciej Gołaszewski 5 anos atrás
pai
commit
486c16d6f9
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      packages/ckeditor5-table/src/tableclipboard.js

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

@@ -179,6 +179,13 @@ export default class TableClipboard extends Plugin {
 				};
 
 				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.