-
-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: misc paste issues * fix * Fixed `transformPasted` * Updated tests * Added test cases * `transformPasted` only get selection checked when table is being pasted * Extracted `shouldApplyFix` * Added comment * Added comments * Added test --------- Co-authored-by: matthewlipski <matthewlipski@gmail.com>
- Loading branch information
1 parent
5c69f17
commit 8a51a79
Showing
29 changed files
with
983 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
packages/core/src/api/clipboard/__snapshots__/external/pasteEndOfParagraph.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
[ | ||
{ | ||
"children": [], | ||
"content": [ | ||
{ | ||
"styles": {}, | ||
"text": "ParagraphParagraph", | ||
"type": "text", | ||
}, | ||
], | ||
"id": "0", | ||
"props": { | ||
"backgroundColor": "default", | ||
"textAlignment": "left", | ||
"textColor": "default", | ||
}, | ||
"type": "paragraph", | ||
}, | ||
{ | ||
"children": [], | ||
"content": { | ||
"columnWidths": [ | ||
undefined, | ||
undefined, | ||
], | ||
"rows": [ | ||
{ | ||
"cells": [ | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
], | ||
}, | ||
{ | ||
"cells": [ | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
], | ||
}, | ||
], | ||
"type": "tableContent", | ||
}, | ||
"id": "1", | ||
"props": { | ||
"textColor": "default", | ||
}, | ||
"type": "table", | ||
}, | ||
{ | ||
"children": [], | ||
"content": [ | ||
{ | ||
"styles": {}, | ||
"text": "Custom Paragraph", | ||
"type": "text", | ||
}, | ||
], | ||
"id": "2", | ||
"props": {}, | ||
"type": "customParagraph", | ||
}, | ||
{ | ||
"children": [], | ||
"content": [], | ||
"id": "3", | ||
"props": { | ||
"backgroundColor": "default", | ||
"textAlignment": "left", | ||
"textColor": "default", | ||
}, | ||
"type": "paragraph", | ||
}, | ||
] |
96 changes: 96 additions & 0 deletions
96
packages/core/src/api/clipboard/__snapshots__/external/pasteEndOfParagraphText.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
[ | ||
{ | ||
"children": [], | ||
"content": [ | ||
{ | ||
"styles": {}, | ||
"text": "ParagraphParagraph", | ||
"type": "text", | ||
}, | ||
], | ||
"id": "0", | ||
"props": { | ||
"backgroundColor": "default", | ||
"textAlignment": "left", | ||
"textColor": "default", | ||
}, | ||
"type": "paragraph", | ||
}, | ||
{ | ||
"children": [], | ||
"content": { | ||
"columnWidths": [ | ||
undefined, | ||
undefined, | ||
], | ||
"rows": [ | ||
{ | ||
"cells": [ | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
], | ||
}, | ||
{ | ||
"cells": [ | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
], | ||
}, | ||
], | ||
"type": "tableContent", | ||
}, | ||
"id": "1", | ||
"props": { | ||
"textColor": "default", | ||
}, | ||
"type": "table", | ||
}, | ||
{ | ||
"children": [], | ||
"content": [ | ||
{ | ||
"styles": {}, | ||
"text": "Custom Paragraph", | ||
"type": "text", | ||
}, | ||
], | ||
"id": "2", | ||
"props": {}, | ||
"type": "customParagraph", | ||
}, | ||
{ | ||
"children": [], | ||
"content": [], | ||
"id": "3", | ||
"props": { | ||
"backgroundColor": "default", | ||
"textAlignment": "left", | ||
"textColor": "default", | ||
}, | ||
"type": "paragraph", | ||
}, | ||
] |
111 changes: 111 additions & 0 deletions
111
packages/core/src/api/clipboard/__snapshots__/external/pasteImage.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
[ | ||
{ | ||
"children": [], | ||
"content": [ | ||
{ | ||
"styles": {}, | ||
"text": "Paragraph", | ||
"type": "text", | ||
}, | ||
], | ||
"id": "0", | ||
"props": { | ||
"backgroundColor": "default", | ||
"textAlignment": "left", | ||
"textColor": "default", | ||
}, | ||
"type": "paragraph", | ||
}, | ||
{ | ||
"children": [], | ||
"content": undefined, | ||
"id": "4", | ||
"props": { | ||
"backgroundColor": "default", | ||
"caption": "", | ||
"name": "", | ||
"previewWidth": 512, | ||
"showPreview": true, | ||
"textAlignment": "left", | ||
"url": "exampleURL", | ||
}, | ||
"type": "image", | ||
}, | ||
{ | ||
"children": [], | ||
"content": { | ||
"columnWidths": [ | ||
undefined, | ||
undefined, | ||
], | ||
"rows": [ | ||
{ | ||
"cells": [ | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
], | ||
}, | ||
{ | ||
"cells": [ | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
[ | ||
{ | ||
"styles": {}, | ||
"text": "Table Cell", | ||
"type": "text", | ||
}, | ||
], | ||
], | ||
}, | ||
], | ||
"type": "tableContent", | ||
}, | ||
"id": "1", | ||
"props": { | ||
"textColor": "default", | ||
}, | ||
"type": "table", | ||
}, | ||
{ | ||
"children": [], | ||
"content": [ | ||
{ | ||
"styles": {}, | ||
"text": "Custom Paragraph", | ||
"type": "text", | ||
}, | ||
], | ||
"id": "2", | ||
"props": {}, | ||
"type": "customParagraph", | ||
}, | ||
{ | ||
"children": [], | ||
"content": [], | ||
"id": "3", | ||
"props": { | ||
"backgroundColor": "default", | ||
"textAlignment": "left", | ||
"textColor": "default", | ||
}, | ||
"type": "paragraph", | ||
}, | ||
] |
Oops, something went wrong.