@atlaskit/editor-plugin-paste 9.0.14 → 9.0.16
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/CHANGELOG.md
CHANGED
|
@@ -32,6 +32,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
32
32
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
33
33
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
34
34
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
35
|
+
var _card = require("@atlaskit/editor-common/card");
|
|
35
36
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
36
37
|
var _mark = require("@atlaskit/editor-common/mark");
|
|
37
38
|
var _nesting = require("@atlaskit/editor-common/nesting");
|
|
@@ -627,7 +628,11 @@ function insertAutoMacro(slice, macro, view, from, to) {
|
|
|
627
628
|
|
|
628
629
|
// replace the text with the macro as a separate transaction
|
|
629
630
|
// so the autoconversion generates 2 undo steps
|
|
630
|
-
|
|
631
|
+
var macroTr = (0, _prosemirrorHistory.closeHistory)(view.state.tr).replaceRangeWith(before, before + slice.size, macro).scrollIntoView();
|
|
632
|
+
(0, _card.addLinkMetadata)(view.state.selection, macroTr, {
|
|
633
|
+
inputMethod: _analytics.INPUT_METHOD.CLIPBOARD
|
|
634
|
+
});
|
|
635
|
+
view.dispatch(macroTr);
|
|
631
636
|
return true;
|
|
632
637
|
}
|
|
633
638
|
return false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
2
|
import uuid from 'uuid/v4';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
4
5
|
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
5
6
|
import { anyMarkActive } from '@atlaskit/editor-common/mark';
|
|
6
7
|
import { getParentOfTypeCount, getPositionAfterTopParentNodeOfType } from '@atlaskit/editor-common/nesting';
|
|
@@ -596,7 +597,11 @@ function insertAutoMacro(slice, macro, view, from, to) {
|
|
|
596
597
|
|
|
597
598
|
// replace the text with the macro as a separate transaction
|
|
598
599
|
// so the autoconversion generates 2 undo steps
|
|
599
|
-
|
|
600
|
+
const macroTr = closeHistory(view.state.tr).replaceRangeWith(before, before + slice.size, macro).scrollIntoView();
|
|
601
|
+
addLinkMetadata(view.state.selection, macroTr, {
|
|
602
|
+
inputMethod: INPUT_METHOD.CLIPBOARD
|
|
603
|
+
});
|
|
604
|
+
view.dispatch(macroTr);
|
|
600
605
|
return true;
|
|
601
606
|
}
|
|
602
607
|
return false;
|
|
@@ -9,6 +9,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
10
10
|
import uuid from 'uuid/v4';
|
|
11
11
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
12
|
+
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
12
13
|
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
13
14
|
import { anyMarkActive } from '@atlaskit/editor-common/mark';
|
|
14
15
|
import { getParentOfTypeCount, getPositionAfterTopParentNodeOfType } from '@atlaskit/editor-common/nesting';
|
|
@@ -600,7 +601,11 @@ function insertAutoMacro(slice, macro, view, from, to) {
|
|
|
600
601
|
|
|
601
602
|
// replace the text with the macro as a separate transaction
|
|
602
603
|
// so the autoconversion generates 2 undo steps
|
|
603
|
-
|
|
604
|
+
var macroTr = closeHistory(view.state.tr).replaceRangeWith(before, before + slice.size, macro).scrollIntoView();
|
|
605
|
+
addLinkMetadata(view.state.selection, macroTr, {
|
|
606
|
+
inputMethod: INPUT_METHOD.CLIPBOARD
|
|
607
|
+
});
|
|
608
|
+
view.dispatch(macroTr);
|
|
604
609
|
return true;
|
|
605
610
|
}
|
|
606
611
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.16",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-mentions": "^10.0.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
|
-
"@atlaskit/flag": "^17.
|
|
44
|
+
"@atlaskit/flag": "^17.9.0",
|
|
45
45
|
"@atlaskit/icon": "^33.1.0",
|
|
46
|
-
"@atlaskit/insm": "^0.
|
|
46
|
+
"@atlaskit/insm": "^0.4.0",
|
|
47
47
|
"@atlaskit/media-client": "^36.0.0",
|
|
48
48
|
"@atlaskit/media-common": "^13.0.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^48.1.0",
|
|
52
52
|
"@atlaskit/tokens": "^11.3.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"uuid": "^3.1.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^112.
|
|
59
|
+
"@atlaskit/editor-common": "^112.11.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0"
|
|
62
62
|
},
|