sheet-happens 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1049,12 +1049,12 @@ function Sheet(props) {
|
|
|
1049
1049
|
var clipboardData = e.clipboardData || window.clipboardData;
|
|
1050
1050
|
var types = clipboardData.types;
|
|
1051
1051
|
|
|
1052
|
-
if (types.includes('text/html')) {
|
|
1053
|
-
var pastedHtml = clipboardData.getData('text/html');
|
|
1054
|
-
parsePastedHtml(pastedHtml);
|
|
1055
|
-
} else if (types.includes('text/plain')) {
|
|
1052
|
+
if (types.includes('text/rtf') && types.includes('text/plain') || types.includes('text/plain') && !types.includes('text/html')) {
|
|
1056
1053
|
var text = clipboardData.getData('text/plain');
|
|
1057
1054
|
parsePastedText(text);
|
|
1055
|
+
} else if (types.includes('text/html')) {
|
|
1056
|
+
var pastedHtml = clipboardData.getData('text/html');
|
|
1057
|
+
parsePastedHtml(pastedHtml);
|
|
1058
1058
|
}
|
|
1059
1059
|
};
|
|
1060
1060
|
|
|
@@ -1316,6 +1316,10 @@ function Sheet(props) {
|
|
|
1316
1316
|
x: cellX,
|
|
1317
1317
|
y: cellY
|
|
1318
1318
|
});
|
|
1319
|
+
|
|
1320
|
+
if (props.onScrollChange) {
|
|
1321
|
+
props.onScrollChange(cellX, cellY);
|
|
1322
|
+
}
|
|
1319
1323
|
}
|
|
1320
1324
|
|
|
1321
1325
|
var newMaxScroll = _extends({}, maxScroll);
|